Hi Team, how to allow CORS origin for glue API.
i had configured $config[GlueApplicationConstants::GLUE_APPLICATION_CORS_ALLOW_ORIGIN] = '*';
i can able to access on postman and endpoints on browser but when i was glue api endpoint i was getting the cors error
Comments
-
Could you please share a screenshot where we can see the endpoint and the parameters you're passing?
Show also the headers tab.
0 -
fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,075 ⚖️ - Guardians (admin)
Heyhey @nagapavankumar.guggil ,
your change should have worked in theory so please provide some more infos as Hidran suggested :)
Additional I want to add that it would be better practise to leave that config line defined by environment variable
$config[GlueApplicationConstants::
GLUE_APPLICATION_CORS_ALLOW_ORIGIN
] = getenv(
'SPRYKER_GLUE_APPLICATION_CORS_ALLOW_ORIGIN'
) ?:
''
;
And adjust the deploy-files similar to that:
glue_eu:
application: glue
endpoints:
glue.de.spryker.local:
store: DE
cors-allow-origin: '*'
glue.at.spryker.local:
store: ATWith this it is easier to configure it later in the cloud.
All the best,
Florian
1 -
u can user sonia@spryker.com and password change123
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 75 Spryker News
- 919 Developer Corner
- 779 Spryker Development
- 89 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 34 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 25 Job Opportunities
- 3.2K 📜 Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 69 Spryker Safari Questions
- 50 Random