linkding
linkding copied to clipboard
Add CORS support
Add CORS support to linkding. This is useful if you are running an alternate web-based frontend. By default, all CORS support is disabled, but once one of the documented environment variables are set, an additional Django middleware (django-cors-headers) is added and configured appropriately.
This change:
- adds a new dependency
django-cors-headers(which adds no additional net-new transitive dependencies) - adds a number of new configuration parameters/environment variables
- documents the settings on the Options page
I'm working on an alternative web-based frontend and also had a need for the Linkding API to return CORS headers. I just tested this PR and it works great (at least for my use case).
Rebased against master