Skip to content
This repository was archived by the owner on Jun 22, 2023. It is now read-only.

allow OPTIONS on json-ld API #176

Closed
alastair opened this issue Apr 8, 2021 · 3 comments · Fixed by #191
Closed

allow OPTIONS on json-ld API #176

alastair opened this issue Apr 8, 2021 · 3 comments · Fixed by #191

Comments

@alastair
Copy link
Member

alastair commented Apr 8, 2021

linked data clients use OPTIONS to see what kind of operations that they can do on a server. Because the json-ld export in the CE is read-only, we should implement OPTIONS that returns:

HTTP/1.1 204 No Content
Allow: OPTIONS, GET

so that clients know that they cannot write to the CE.

@alastair alastair self-assigned this Apr 8, 2021
@musicog
Copy link
Member

musicog commented Apr 8, 2021

@alastair alastair removed their assignment Apr 11, 2021
@ChristiaanScheermeijer
Copy link
Collaborator

@alastair @musicog the Allow header should only be set when a wrong request method is being used. We do support POST requests for GraphQL requests. Should this restriction only be made for the /:identifier route?

@alastair
Copy link
Member Author

alastair commented Apr 30, 2021

From what I understand I think that we should do:

OPTIONS /:identifier -> return Allow: OPTIONS, GET
GET /:identifier -> return data (optionally add Allow: OPTIONS, GET)
POST /:identifier -> return method not allowed (optional add Allow: OPTIONS, GET)

I'm not sure if Allow: should also be included in the GET and POST methods, however the header should only appear in the /:identifier route

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants