Gary
Simple Lambda Cookie Question
tldr: Do cookies work on initial page load on AWS Lambda?
Hey folks - building something for aws-lambda and everything is up and running except the
useCookie
method on initial load: I'm reading it in some routeMiddleware and looks something like this:
So, simple test to see if they are on any route other than pin-code
and if they are I read the cookie. If the cookie isnt there or it doesn't equal to my super secure password I redirect them to the pin-code page.
This works totally fine locally. On Lambda it works on any subsequent page as you click around and router is used. However, initial page load doesn't seem to be able to read the cookie. What am I missing?3 replies
Nitro routeRules shouldInvalidateCache
Not sure I understand how or why but from Nuxt nuxt.config.ts why do the shouldInvalidateCache and shouldBypassCache functions not work?
If I do the following:
Time never updates until the maxAge expires. I would imagine that cache would be invalidated every time the page loaded.
1 replies