Open-Book-Genome-Project/TheBestBookOn.com

Apply CORS in a measured way

Closed this issue · 2 comments

Currently, all endpoints can be accessed by outside domains.

Endpoints that should be available to outside domains should be identified. Requests from outside domains to other endpoints should be rejected.

I intend to work on this at some point during this week. If there are no objections, I will implement the following CORS rules:

  • Any domain can make a GET request to an /api or /api/* endpoint.
  • OL domains can POST to /api/observations

Closing this for now. The most pressing security concerns surrounding this were addressed by #40. Remaining concerns will be resolved upon the implementation of #45.