Skip to content

Laravel app is not creating XSRF-TOKEN cookie #32

Open
@mhetreramesh

Description

@mhetreramesh

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.
image

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    supportSomeone needs help

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions