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

OPTIONS support #32

Closed
emersion opened this issue Sep 30, 2022 · 7 comments
Closed

OPTIONS support #32

emersion opened this issue Sep 30, 2022 · 7 comments

Comments

@emersion
Copy link

It would be nice to add support for OPTIONS to push endpoints. This would allow the HTTP clients to check which methods are supported and check CORS.

@p1gp1g
Copy link
Member

p1gp1g commented Oct 7, 2022

Can be related to #30

@karmanyaahm @sparchatus for suggestions

@emersion
Copy link
Author

emersion commented Oct 7, 2022

Hm, it seems like that RFC does not recommend OPTIONS: https://www.rfc-editor.org/rfc/rfc9205.html#section-4.5.2

@karmanyaahm
Copy link
Member

idk tbh. Do web browsers really need to post to UP? And in any non-browser context, the current GET based discovery without CORS is sufficient.
Mandating it would further complicate push providers, and making it optional would make it useless for reliable detection.

Do you have a specific use case in mind?

@karmanyaahm
Copy link
Member

Yes, semantically, I think it may have been better to do discovery on OPTIONS, but 1. GET is much more common and 2. that ship has already sailed.

@emersion
Copy link
Author

emersion commented Oct 8, 2022

My use-case is to check whether a push endpoint is valid without hardcoding anything UnifiedPush specific. I also support other Web Push endpoints.

I've switched to just sending a test push message since then, so I'm okay with closing this.

@karmanyaahm
Copy link
Member

Interesting ... Do most web push servers automatically support OPTIONS?

RFC8030 doesn't say anything about it. I agree that being able to detect WebPush and UnifiedPush in one would be helpful, though test pushes are even better. Closing is your call.

@emersion
Copy link
Author

At least the Mozilla server (updates.push.services.mozilla.com) seems to support OPTIONS… Haven't tested the rest.

Indeed, RFC 8030 doesn't say anything about it, so nothing would stop a Web Push server from rejecting OPTIONS.

Let's close this for now.

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

No branches or pull requests

3 participants