Basic Auth - Disable for API
Benny Poensgen
I am setting up Shopware 6 and need basic auth or HTTP access control for the dev environment.
The basic auth available provided by the management interface (as described here) however does not work for Shopware, as it blocks all requests. The Shopware 6 Admin UI however does make calls to Shopware's admin API, and these requests, with a URI like /api/…, should not be blocked.
How can I definie a basic auth, that allows all requests to /api but only requires authorization for other requests? Is this something that would go under the web section of .platform.app.yaml, and if so, how?
1
Comments
The short answer is “no”. What you're asking for is not accomplishable in the .platform.app.yaml file.
you can potentially have your CDN implement the auth for specific locations of your app. I know Fastly will let you do this via a VCL. https://docs.fastly.com/en/guides/basic-authentication
It's possible the other CDNs offer something similar.
Please sign in to leave a comment.