mirror of
https://github.com/tobychui/zoraxy.git
synced 2025-06-03 06:07:20 +02:00
Optimized csrf mux
- Forced same site to lax mode for better browser compatibility - Set zoraxy-csrf as cookie name
This commit is contained in:
parent
f595da92a1
commit
c1e16d55ab
10
src/main.go
10
src/main.go
@ -180,8 +180,14 @@ func main() {
|
||||
nodeUUID = string(uuidBytes)
|
||||
|
||||
//Create a new webmin mux and csrf middleware layer
|
||||
webminPanelMux := http.NewServeMux()
|
||||
csrfMiddleware := csrf.Protect([]byte(nodeUUID))
|
||||
webminPanelMux = http.NewServeMux()
|
||||
csrfMiddleware = csrf.Protect(
|
||||
[]byte(nodeUUID),
|
||||
csrf.CookieName("zoraxy-csrf"),
|
||||
csrf.Secure(false),
|
||||
csrf.Path("/"),
|
||||
csrf.SameSite(csrf.SameSiteLaxMode),
|
||||
)
|
||||
|
||||
//Startup all modules
|
||||
startupSequence()
|
||||
|
Loading…
x
Reference in New Issue
Block a user