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
As per laravel docs, every application should create encrypted XSRF-TOKEN cookie. I also have this cookie on my dev environment but not on lambda function.
This is the cookie missing on lambda function.
I've tried adding custom header for lambda function in serverless file, like:
functions:
# This function runs the my website/API
web:
handler: public/index.php
timeout: 28 # in seconds (API Gateway has a timeout of 29 seconds)
layers:
- ${bref:layer.php-74-fpm}
- ${bref:extra.gd-php-74}
events:
- httpApi: '*'
cors:
origin: '*'
headers:
- X-XSRF-TOKEN
I use this to on the frontend(Inertia) application for axios requests.
Does someone has any idea if I'm missing something?
The text was updated successfully, but these errors were encountered:
I managed to solve it by going straight to the CloudFront panel and adding the X-CSRF-TOKEN header to the Policy (custom policies -> cache key settings).
@aristidesneto-bnw Thank you very much for the serverless-lift doc's link. After 3-4 hours, finally, I solved the X-CSRF-TOKEN header problem. I added X-CSRF-TOKEN header to serverless.yml as in the serverless-lift documents. And it works perfectly.
As per laravel docs, every application should create encrypted
XSRF-TOKEN
cookie. I also have this cookie on my dev environment but not on lambda function.This is the cookie missing on lambda function.
I've tried adding custom header for lambda function in serverless file, like:
I use this to on the frontend(Inertia) application for
axios
requests.Does someone has any idea if I'm missing something?
The text was updated successfully, but these errors were encountered: