Story #7816
closedas a user, I can access pulpcore REST API from another domain
0%
Description
In some instances such as during development, Web UI needs to run on a different port from the REST API. In these instances the REST API needs to set "Access-Control-Allow-Origin" header on the response.
This can be accomplished using "django-cors-headers"[0].
Updated by bmbouter over 3 years ago
If it's only used for development, can we use dynaconf to fully configure this without picking up a formal dependency?
Also what would such a dynaconf config look like for example?
Updated by dkliban@redhat.com over 3 years ago
The problem is that this requires adding a new Python dependency. We can't add that dependency using dynaconf.
The alternative to using this dependency is creating our own very basic middleware that can be enabled using a setting.
Updated by dkliban@redhat.com over 3 years ago
Another alternative during development is using some kind of proxy[0].
Updated by dkliban@redhat.com over 3 years ago
- Status changed from NEW to CLOSED - WONTFIX
We will go with a proxy solution. Webpack provides such a proxy just for these purposes[0].
[0] https://webpack.js.org/configuration/dev-server/#devserverproxy