mirror of
				https://github.com/mickael-kerjean/filestash.git
				synced 2025-11-01 02:43:35 +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)
 | |
| 		}
 | |
| 	})
 | |
| }
 | 
