MetaCell / sckan-composer

0 stars 0 forks source link

Feature/esckan-35 - KnowledgeStatement endpoint fixes #265

Closed D-GopalKrishna closed 2 months ago

D-GopalKrishna commented 2 months ago

jira Link - update on -> https://metacell.atlassian.net/browse/ESCKAN-35

afonsobspinto commented 2 months ago

question: Should we allow this endpoint to be accessible from any origin (enable CORS)?

Specifically, will Explorer be able to make requests directly to this endpoint or will it need a proxy?

D-GopalKrishna commented 2 months ago

question: Should we allow this endpoint to be accessible from any origin (enable CORS)?

Specifically, will Explorer be able to make requests directly to this endpoint or will it need a proxy?

Indeed @afonsobspinto! We do need to allow CORS. thanks!

zsinnema commented 2 months ago

@afonsobspinto imo we don't need cors

D-GopalKrishna commented 2 months ago

Edited the title and description of the PR to include the full scope of the fix for KS endpoint.

D-GopalKrishna commented 2 months ago

About CORS from the docs. - https://github.com/adamchainz/django-cors-headers?tab=readme-ov-file#signals

image


In our case, we don't use CORS_ALLOWED_ORIGINS. We simply use from corsheaders.signals import check_request_enabled to enable the path for /api/composer/knowledge-statement/.

cc @zsinnema @afonsobspinto