Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cors support in remote #99

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

gludington
Copy link

While developing an Owlbear2 extension to interface with Kenku, I noticed requests are blocked due to CORS limitations. This PR uses the version of fastify-cors compatible with kenku's version of fastify to add an Access-Control-Allowed-Header, e.g. from my Owlbear 2 extension running on 5173, the response headers are:

HTTP/1.1 200 OK
vary: Origin
access-control-allow-origin: http://localhost:5173
content-type: application/json; charset=utf-8
content-length: 341
Date: Sun, 21 May 2023 20:56:45 GMT
Connection: keep-alive
Keep-Alive: timeout=5

Greg Ludington added 2 commits May 21, 2023 16:48
version of fastify kenku uses) to allow CORS
requests to support browser requests, e.g. owlbear2 extensions
@gludington
Copy link
Author

That enabled GET, but it appears preflight is required for PUT and POST, so this is not complete

@gludington
Copy link
Author

Updated with commit works for get and put requests to develop playlist extension

@ep1cman
Copy link

ep1cman commented Jan 29, 2024

Is there anything hold back this PR being merged? I would also like to be able to control kenk.fm from within other software

@Several-Record7234
Copy link

Capacity of the (two) OBR devs is a limitation, and the focus right now is on the next major release of Owlbear Rodeo.

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

Successfully merging this pull request may close these issues.

3 participants