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

Opt-in for non-GET endpoints #540

Open
Dreamsorcerer opened this issue Dec 2, 2024 · 4 comments
Open

Opt-in for non-GET endpoints #540

Dreamsorcerer opened this issue Dec 2, 2024 · 4 comments

Comments

@Dreamsorcerer
Copy link
Member

We should consider making #452 an opt-in feature in v3.
I've seen backend developers create a POST endpoint for SSE, and then frontend developers point out that they can't use it.
So, it might make sense to disallow non-GET endpoints by default again, so developers don't make this mistake.

@Olegt0rr
Copy link
Collaborator

Olegt0rr commented Dec 2, 2024

Frontend can't use non-GET methods with default EventSource. But with other sse-clients they can use other methods.

Original request: #414 (comment)

@Olegt0rr
Copy link
Collaborator

Olegt0rr commented Dec 2, 2024

Do you wanna implement it as a feature-toggle?
allow_all_methods: bool

@Dreamsorcerer
Copy link
Member Author

Yeah, probably something like that.

@Olegt0rr
Copy link
Collaborator

Olegt0rr commented Dec 2, 2024

What about something like this? #543

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

2 participants