mirror of
https://github.com/mickael-kerjean/filestash.git
synced 2025-11-01 19:32:27 +08:00
19 lines
429 B
Go
19 lines
429 B
Go
package plg_application_office
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
. "github.com/mickael-kerjean/filestash/server/common"
|
|
)
|
|
|
|
func init() {
|
|
Hooks.Register.Middleware(func(h HandlerFunc) HandlerFunc {
|
|
return func(app *App, res http.ResponseWriter, req *http.Request) {
|
|
head := res.Header()
|
|
head.Set("Cross-Origin-Opener-Policy", "same-origin")
|
|
head.Set("Cross-Origin-Embedder-Policy", "require-corp")
|
|
h(app, res, req)
|
|
}
|
|
})
|
|
}
|