mirror of
https://github.com/grafana/grafana.git
synced 2025-07-29 19:52:35 +08:00
Plugins: Serve static assets directly instead of through middleware handler (#32779)
* removed static routes from macaron * move path src to plugins pkg * use plugin details * remove dead code * fixes * use clean from std lib * reformat imports * remove caching headers + add security checks * revert using no cache header middleware * add cache-control headers * add 404 check * use new var for subsequent file handling
This commit is contained in:
@ -131,6 +131,9 @@ func (hs *HTTPServer) registerRoutes() {
|
||||
// api renew session based on cookie
|
||||
r.Get("/api/login/ping", quota("session"), routing.Wrap(hs.LoginAPIPing))
|
||||
|
||||
// expose plugin file system assets
|
||||
r.Get("/public/plugins/:pluginId/*", hs.GetPluginAssets)
|
||||
|
||||
// authed api
|
||||
r.Group("/api", func(apiRoute routing.RouteRegister) {
|
||||
// user (signed in)
|
||||
|
Reference in New Issue
Block a user