You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i am returning header(X-Is-Cacheable: yes) in response to my api call.
below is my custom service code. workbox.routing.registerRoute( /http:\/\/127\.0\.0\.1\/lumen/, new workbox.strategies.CacheFirst({ cacheName: 'api-cache', plugins: [ new workbox.cacheableResponse.Plugin({ statuses: [200], headers: { 'X-Is-Cacheable': 'yes', }, }) ] }), 'GET' )
Issue is that 'api-cache' is being created for headers (X-Is-Cacheable: no) and also there is no response data being save for responses having (X-Is-Cacheable: yes) header.
The text was updated successfully, but these errors were encountered:
It looks like you're making a CORS request to the third-party origin http://127.0.0.1/. Because you're using CORS, there are limits on the headers that are exposed on your Response objects by default.
You can override those limits by explicitly adding a Access-Control-Expose-Headers: X-Is-Cacheable header to your server-generated response, along with the X-Is-Cacheable: yes header.
using /workbox-cdn/releases/4.3.0/workbox-sw.js
i am returning header(X-Is-Cacheable: yes) in response to my api call.
below is my custom service code.
workbox.routing.registerRoute( /http:\/\/127\.0\.0\.1\/lumen/, new workbox.strategies.CacheFirst({ cacheName: 'api-cache', plugins: [ new workbox.cacheableResponse.Plugin({ statuses: [200], headers: { 'X-Is-Cacheable': 'yes', }, }) ] }), 'GET' )
Issue is that 'api-cache' is being created for headers (X-Is-Cacheable: no) and also there is no response data being save for responses having (X-Is-Cacheable: yes) header.
The text was updated successfully, but these errors were encountered: