replace gorilla mux with http.ServeMux
james-prysm opened this issue Β· comments
james-prysm commented
π Issue
go now supports inbuilt routing registration meaning we may be able to get rid of the gorilla mux dependency.
Background
It doesn't seem like gorilla mux can be replaced out of the box. There are known features it does not support as well as possible side effects.
- does not come with middleware support. currently we use the
router.Use
method on gorilla mux to register middleware and so we would need some added utility to register the middleware - I'm not sure if CORs support comes out of the box and so that would need to be added as well
- changing the .Method validation on registration to be part of the path definition as defined in this article https://go.dev/blog/routing-enhancements
- better understand the effects and changes to path variables or query parameters
- test if sub routes are effected ( especially regarding the web UI)
TODO:
- replace all references of gorilla mux with HTTP library or a new package under API to support features
- remove go.mod dependency and running go mod tidy
- Test rest implementation and do web app sanity check
Dependent on #14089 merging
Md Amaan commented
I am on this plz assign this to me @james-prysm
james-prysm commented
merged in