linkding icon indicating copy to clipboard operation
linkding copied to clipboard

Add CORS support

Open abatkin opened this issue 5 months ago • 2 comments

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

abatkin avatar Jul 13 '25 19:07 abatkin

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).

garyp avatar Jul 23 '25 01:07 garyp

Rebased against master

abatkin avatar Oct 05 '25 18:10 abatkin