feature (plugins): expand and migrate plugin - #803

* chore (dockerfile): cleanup dockerfile

* feature (plugin): extend plugin interface

* chore (docker): setup new Dockerfile

* chore (dockerfile): update dockerfile
This commit is contained in:
Mickael
2025-01-13 15:41:04 +11:00
committed by GitHub
parent 82dd3adf5d
commit d30c3120b6
49 changed files with 901 additions and 11470 deletions

View File

@ -91,6 +91,7 @@ func Build(a App) *mux.Router {
// Application Resources
middlewares = []Middleware{ApiHeaders, SecureHeaders, PluginInjector}
r.HandleFunc(WithBase("/api/backend"), NewMiddlewareChain(AdminBackend, middlewares, a)).Methods("GET")
r.HandleFunc(WithBase("/api/plugin"), NewMiddlewareChain(PluginExportHandler, middlewares, a)).Methods("GET")
r.HandleFunc(WithBase("/api/config"), NewMiddlewareChain(PublicConfigHandler, append(middlewares, PublicCORS), a)).Methods("GET", "OPTIONS")
middlewares = []Middleware{StaticHeaders, SecureHeaders, PublicCORS, PluginInjector}
if os.Getenv("CANARY") == "" { // TODO: remove after migration is done
@ -100,6 +101,7 @@ func Build(a App) *mux.Router {
} else { // TODO: remove this after migration is done
r.PathPrefix(WithBase("/assets")).Handler(http.HandlerFunc(NewMiddlewareChain(ServeFile("/"), middlewares, a))).Methods("GET", "OPTIONS")
r.HandleFunc(WithBase("/favicon.ico"), NewMiddlewareChain(ServeFavicon, middlewares, a)).Methods("GET")
r.HandleFunc(WithBase("/plugin/{name}/{path:.+}"), NewMiddlewareChain(PluginStaticHandler, middlewares, a)).Methods("GET")
}
// Other endpoints