mirror of
https://github.com/mickael-kerjean/filestash.git
synced 2025-10-29 09:07:30 +08:00
fix (embed): Filestash embedding issue
whenever embedding something with a locale setup, it would crash while trying to download the translation. This was due to some missunderstanding of how fetch work while in an iframe and all the reports would get miss because of that same issue as it was sent not to the origin server but the website embedding the frame
This commit is contained in:
@ -103,8 +103,8 @@ func Build(r *mux.Router, a App) {
|
||||
}
|
||||
|
||||
// Other endpoints
|
||||
middlewares = []Middleware{ApiHeaders, PluginInjector}
|
||||
r.HandleFunc(WithBase("/report"), NewMiddlewareChain(ReportHandler, middlewares, a)).Methods("POST")
|
||||
middlewares = []Middleware{ApiHeaders, PluginInjector, PublicCORS}
|
||||
r.HandleFunc(WithBase("/report"), NewMiddlewareChain(ReportHandler, middlewares, a)).Methods("POST", "OPTIONS")
|
||||
middlewares = []Middleware{IndexHeaders, SecureHeaders, PluginInjector}
|
||||
r.HandleFunc(WithBase("/about"), NewMiddlewareChain(AboutHandler, middlewares, a)).Methods("GET")
|
||||
r.HandleFunc(WithBase("/robots.txt"), NewMiddlewareChain(RobotsHandler, []Middleware{}, a))
|
||||
|
||||
Reference in New Issue
Block a user