Git Product home page Git Product logo

Comments (2)

aristidesneto-bnw avatar aristidesneto-bnw commented on August 15, 2024 1

Did you manage to solve it?

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

But using the serverless.yml file I had no success following as described in the documentation https://github.com/getlift/lift/blob/master/docs/server-side-website.md#forwarded-headers.

I would not like to add the header manually through CloudFront, but through the serverless.yml configuration file

from laravel-bridge.

evrend avatar evrend commented on August 15, 2024 1

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

constructs:
    website:
        type: server-side-website
        domain: ***********
        certificate: arn:aws:************
        forwardedHeaders:
            - X-XSRF-TOKEN
            - Origin
            - Accept
            ....

Result:

image

from laravel-bridge.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.