Can't register Kirby and keep logout on production environment

I created an issue on github about that, you can read the full version here :

Note: tested on 2 machines, 1 PC and 1 MAC, on Safari and Chrome(this one tested on the 2 OS) and still… got logout on Refresh.

Could you please test if the issue goes away if you disable caching in your browser?

Or if you set

<IfModule mod_expires.c>
ExpiresActive off

in your .htaccess/server configuration

Yes, this seems to fix my issue, but it affects (indeed) all my caching rules.

Here’s my full rules setup (with ExpiresActive at on):

# -------------------------------------------------------------------------------------------------------------------------
<IfModule mod_expires.c>
# Enable expirations
ExpiresActive On
# Default directive
ExpiresDefault "access plus 1 month"
# My favicon
ExpiresByType image/x-icon "access plus 1 year"
# Images
ExpiresByType image/gif "access plus 6 month"
ExpiresByType image/png "access plus 6 month"
ExpiresByType image/jpg "access plus 6 month"
ExpiresByType image/jpeg "access plus 6 month"
ExpiresByType image/svg "access plus 6 month"
# Videos
ExpiresByType video/mp4 "access plus 6 month"
ExpiresByType video/webm "access plus 6 month"
# Fonts
ExpiresByType application/font-woff "access plus 6 month" 
ExpiresByType application/font-woff2 "access plus 6 month"
ExpiresByType application/font-sfnt "access plus 6 month"
ExpiresByType application/ "access plus 6 month"
ExpiresByType text/css "access plus 6 month"
# Javascript
ExpiresByType application/javascript "access plus 1 year"
# -------------------------------------------------------------------------------------------------------------------------
<IfModule mod_headers.c>
  <FilesMatch ".(js|css|xml|gz|html|woff2|woff|otf|eot|ttf|svg|jpg|png|gif|jpeg)$">
    Header append Vary: Accept-Encoding
# -------------------------------------------------------------------------------------------------------------------------
<IfModule mod_mime.c>
    AddType application/javascript          js	
	AddType application/font-sfnt           otf ttf
	AddType application/font-woff           woff
	AddType application/font-woff2          woff2
	AddType application/   eot  
    AddType image/svg+xml                   svg svgz 
    AddEncoding gzip                        svgz
# -------------------------------------------------------------------------------------------------------------------------
<IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/html text/plain text/css application/json
    AddOutputFilterByType DEFLATE application/javascript
    AddOutputFilterByType DEFLATE text/xml application/xml text/x-component
    AddOutputFilterByType DEFLATE application/xhtml+xml application/rss+xml application/atom+xml
    AddOutputFilterByType DEFLATE image/x-icon image/svg+xml application/ application/x-font-ttf font/opentype
# -------------------------------------------------------------------------------------------------------------------------
Options +Multiviews
# -------------------------------------------------------------------------------------------------------------------------
#Header unset ETag
#FileETag None

Is there a way to turn if off on the panel ?

I’m aware of the problem.
See this: Content in Panel (randomly) not saving; user logged out or cannot log out without refreshing

Saw that, but with no working solution its kinda tough to make it work.

I tried this, without success:

#	Disable cache for /panel/ URIs
RewriteRule ^panel - [E=NOCACHE:1]
Header set Cache-Control "no-cache, no-store, must-revalidate, max-age=0, proxy-revalidate, no-transform" env=NOCACHE
Header set Pragma "no-cache" env=NOCACHE
ExpiresActive Off env=NOCACHE

I’ve added these lines, and it seems to solve the problem:

 ExpiresByType application/json                      "access plus 0 seconds"
 ExpiresByType application/ld+json                   "access plus 0 seconds"
 ExpiresByType application/schema+json               "access plus 0 seconds"
 ExpiresByType application/vnd.geo+json              "access plus 0 seconds"
 ExpiresByType application/xml                       "access plus 0 seconds"
 ExpiresByType text/xml                              "access plus 0 seconds"

1 Like

Totally worked, thank you! Back to à 99% score on Google PageSpeed Insights.