Question

App Platform: Could there be a "allow_headers" option for CORS?

Hey there.

I am getting the CORS error: “Request header field authorization is not allowed by Access-Control-Allow-Headers in preflight response.”

This is due to not being able to set “allow_headers” in the App Specification file. (This key does not yet exist.)

Is there any way to do something about this?

Stay healthy! Nick

Related questions:


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

You can actually do it by download the yaml file and adding it manually.

- cors:
    allow_headers:
    - '*'
    allow_methods:
    - GET
    - OPTIONS
    - POST
    - PUT
    - PATCH
    - DELETE
    allow_origins:
    - prefix: http://localhost:3001

I am building an embedded app into another website. I would like to set “Access-Control-Allow-Origin” to “" and “Content-Security-Policy” to "frame-ancestors https://.xxx.com”

Is it possible to do so?

I’m having the same issue. I want to allow certain headers in my requests. Any idea on how to solve it?