You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: