mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-26 09:34:57 +08:00
Added same-site policy for session options (#1381)
* Feat: added same-site policy for session options * Feat: configurations in conf package to control the `SameSite` mode and `Secure` value of the session. Co-authored-by: AaronLiu <abslant@126.com>
This commit is contained in:
@@ -63,6 +63,8 @@ type cors struct {
|
||||
AllowHeaders []string
|
||||
AllowCredentials bool
|
||||
ExposeHeaders []string
|
||||
SameSite string
|
||||
Secure bool
|
||||
}
|
||||
|
||||
var cfg *ini.File
|
||||
|
||||
@@ -30,6 +30,8 @@ var CORSConfig = &cors{
|
||||
AllowHeaders: []string{"Cookie", "X-Cr-Policy", "Authorization", "Content-Length", "Content-Type", "X-Cr-Path", "X-Cr-FileName"},
|
||||
AllowCredentials: false,
|
||||
ExposeHeaders: nil,
|
||||
SameSite: "Default",
|
||||
Secure: false,
|
||||
}
|
||||
|
||||
// SlaveConfig 从机配置
|
||||
|
||||
Reference in New Issue
Block a user