Closed D-GopalKrishna closed 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?
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!
@afonsobspinto imo we don't need cors
Edited the title and description of the PR to include the full scope of the fix for KS endpoint.
About CORS from the docs. - https://github.com/adamchainz/django-cors-headers?tab=readme-ov-file#signals
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
jira Link - update on -> https://metacell.atlassian.net/browse/ESCKAN-35
super(ConnectivityStatementSerializer, self).to_representation(instance)
/api/composer/knowledge-statement/
using django-cors-header's signals.