What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

For the docker/sdk their is an option to set CORS: ``` fastcgi_param SPRYKER_GLUE_APPLICATION_CORS_A

Posts: 29 πŸ§‘πŸ»β€πŸš€ - Cadet

For the docker/sdk their is an option to set CORS:


But when i have an external frontend for example in a Azure CDN i get the following message:
No 'Access-Control-Allow-Origin' header is present on the requested resource.

Welcome!

It looks like you're new here. Sign in or register to get started.

Comments

  • Cloud Platform Architect Sprykee Posts: 781 πŸ§‘πŸ»β€πŸš€ - Cadet

    Please add the following in config/Shared/config_default-docker.php


  • Posts: 29 πŸ§‘πŸ»β€πŸš€ - Cadet

    I already add this line in the docker conf, but the error still exists.

  • Cloud Platform Architect Sprykee Posts: 781 πŸ§‘πŸ»β€πŸš€ - Cadet

    Can you check manually in response headers?

  • Cloud Platform Architect Sprykee Posts: 781 πŸ§‘πŸ»β€πŸš€ - Cadet

    But anyway I would prefer to setup CORS on proxy level, not on app level.

  • Posts: 29 πŸ§‘πŸ»β€πŸš€ - Cadet

    Ok i will check the headers, but I totally agree with you to set the CORS on proxy level

  • Posts: 29 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited November 2019

    Ok so i remove the SPRYKER_GLUE_APPLICATION_CORS_ALLOW_ORIGIN and set the header in the nginx with


    Now im getting the following error, is there any "magic" in spryker were the application is trying to set this header?


  • Posts: 546 πŸ§‘πŸ»β€πŸš€ - Cadet

    should be


  • Posts: 29 πŸ§‘πŸ»β€πŸš€ - Cadet

    unfortunately there is no set_header option for nginx

  • Cloud Platform Architect Sprykee Posts: 781 πŸ§‘πŸ»β€πŸš€ - Cadet
  • Posts: 546 πŸ§‘πŸ»β€πŸš€ - Cadet

    ah crap indeed it was about proxy, my bad

  • Posts: 29 πŸ§‘πŸ»β€πŸš€ - Cadet

    no problem, i didn't get it, when i follow the idea from @ULYHPR789 i get multiple values, so i decide to role all configs back and remove the SPRYKER_GLUE_APPLICATION_CORS_ALLOW_ORIGIN from the code, now im getting this:


    For now, i think i remove all rhe origins modification from our config or code and spryker still get some from wherever

Welcome!

It looks like you're new here. Sign in or register to get started.