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

Automatically generate OPTIONS handlers for all paths #876

Open
morremeyer opened this issue Dec 2, 2023 · 0 comments
Open

Automatically generate OPTIONS handlers for all paths #876

morremeyer opened this issue Dec 2, 2023 · 0 comments
Labels
development Things that support development of the software

Comments

@morremeyer
Copy link
Member

morremeyer commented Dec 2, 2023

It should be possible to automatically generate OPTIONS handlers for all paths.

This would save a lot of the current code since OPTIONS handlers are written manually currently.

The OPTIONS handler for single resource endpoints could even be rewritten to always return the possible HTTP verbs without checking if the resource exists - the endpoint will always accept all the methods, just the HTTP response will differ depending on the resource existing or not.

This could be built into its own repository and module so that it can easily be used by other gin users, too. However, if that makes it more complex to develop and maintain, it should be part of the backend codebase in its own module.

@morremeyer morremeyer added the development Things that support development of the software label Dec 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development Things that support development of the software
Projects
None yet
Development

No branches or pull requests

1 participant