Closed remihuigen closed 2 weeks ago
When you open the browser console, what is the response of the XHR resquest?
On first load there is no request, see below (these are all fetch/XHR requests in the network tab) 👇
If navigating to /cache from another route, there is a request to https://admin.hub.nuxt.com/api/teams/onderwijsin/projects/onderwijsloket-navigator/production/cache
which responds with
{
"url": "/api/teams/onderwijsin/projects/onderwijsloket-navigator/production/cache",
"statusCode": 403,
"statusMessage": "",
"message": "[GET] \"https://onderwijsloket-navigator.nuxt.dev/api/_hub/cache\": 403 ",
"stack": "",
"data": {
"url": "/api/_hub/cache",
"statusCode": 403,
"statusMessage": "",
"message": "Missing Authorization header",
"stack": ""
}
}
Hey @remihuigen
I checked other routes (like /api/_hub/manifest
) but I get the same 403 error, do you have any server middleware in your application that could strip the Authorization header somehow?
Or modules like nuxt-security
or others?
@atinux Your suggestion put me on the right track! I was indeed stripping headers... I still used an old example for a custom $fetch plugin
Updating this code to follow the latest example fixed the issue
Describe the bug the route
/{team}/{project}/production/server/cache
in admin app shows placeholder ("To enable cache storage ..."), even though cache is enabled in nuxt.config withhub.cache = true
Server cache itself is working correctly based on some testing. It's just an issue with the UI in the admin app.