SeaTable Version: 6.0.10 (self-hosted, operated by a hosting partner)
Authentication: SSO via Microsoft Entra ID
Base owned by a group; affected users are group admins
Describe the Problem/Error/Question:
We use JavaScript scripts triggered by button columns (they only modify a status column via base.modifyRow).
Repeatedly, for some users the scripts suddenly break:
Opening the script in the script editor shows the HTML of the SeaTable error page (“Der Zugriff wurde verweigert” / “Access denied”) instead of the JavaScript code.
Clicking the button fails (red X), obviously because the HTML is executed as JS.
At the same time, another user (also group admin) sees the correct script code, so the file on the server is intact.
Logging out and in again does not help.
Disabling the cache in DevTools or clearing site data for the SeaTable domain fixes it immediately, until it happens again some time later.
In DevTools the request shows status 200, served from the browser cache, but the content is the HTML error page.
Our assumption: when the session is expired or invalid, the asset endpoint returns the error page with status 200 and cacheable headers instead of 403 or a login redirect. The browser caches this response under the script URL and keeps serving it, even after a new login.
Questions:
Is this a known issue in 6.0.x, and is it fixed in a newer version?
Should the asset endpoint (at least for /scripts/) send Cache-Control: no-store, or return a proper 403 or redirect instead of 200?
Is there a recommended nginx config to prevent caching of these responses?
Error Messages:
Response for GET /workspace/<id>/asset/<base-uuid>/scripts/<script>.js: Status 200 (from disk cache)
The assumption that the asset endpoint returns an HTML error page with status 200 is correct.
But SeaTable does not set any Cache-Control headers for these responses.
Instead, the content of the script is cached within the JS code.
You can verify this by repeatedly opening the same script, there shouldn’t be any outgoing network requests in the network tab after the first time.
Is it possible that your hosting partner is setting additional cache headers for certain file types/extensions?
If not, can you provide the response headers that are visible in the network tab?
So the issue should definitely be gone after a new login.
Regarding your questions:
No. But the behavior of returning an HTML response with status code 200 in case the session has expired is still present in the latest development release. This could certainly be improved.
Regarding the cache headers: These shouldn’t be the root cause of the issue.
But I agree with you that the server should probably return a 403, which the client should then handle by displaying a modal asking you to log in again. This approach is already used in other parts of SeaTable.
I wouldn’t recommend this as a first step since I’m pretty sure that the issue is not caused by incorrect cache headers.
But I’ll take a second look if you can provide the actual headers the server is returning.
thanks, I found the cause in the response headers.
The asset URL does not return the script directly but a 302 redirect to a temporary file-server URL. This redirect is cached by the browser:
GET /workspace/19/asset/<base-uuid>/scripts/9Z06.js
Status: 302 Found (from disk cache)
Cache-Control: max-age=49711
Expires: Wed, 21 Oct 2026 00:30:00 GMT
Location: https://table.mydomain.com/seafhttp/files/<token>/9Z06.js
Server: openresty
So the browser caches the redirect including the short-lived download token for ~14 hours. Once the token expires, the cached redirect points to an invalid /seafhttp/files/<token>/… URL, which returns the “access denied” HTML page with status 200. That page then ends up in the script editor or gets executed by the button. A new login doesn’t help because the redirect is still served from the disk cache.
Questions:
Is the Cache-Control / Expires on this 302 set by SeaTable, or is it most likely added by our hosting partner’s openresty config?
Shouldn’t redirects containing a temporary token always be sent with Cache-Control: no-store?