mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 06:40:54 +03:00
trim values for string lists which can be set as env vars
See #857 Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -43,10 +43,10 @@ func (s *webDavServer) listenAndServe(compressor *middleware.Compressor) error {
|
||||
}
|
||||
if s.config.Cors.Enabled {
|
||||
c := cors.New(cors.Options{
|
||||
AllowedOrigins: s.config.Cors.AllowedOrigins,
|
||||
AllowedMethods: s.config.Cors.AllowedMethods,
|
||||
AllowedHeaders: s.config.Cors.AllowedHeaders,
|
||||
ExposedHeaders: s.config.Cors.ExposedHeaders,
|
||||
AllowedOrigins: util.RemoveDuplicates(s.config.Cors.AllowedOrigins, true),
|
||||
AllowedMethods: util.RemoveDuplicates(s.config.Cors.AllowedMethods, true),
|
||||
AllowedHeaders: util.RemoveDuplicates(s.config.Cors.AllowedHeaders, true),
|
||||
ExposedHeaders: util.RemoveDuplicates(s.config.Cors.ExposedHeaders, true),
|
||||
MaxAge: s.config.Cors.MaxAge,
|
||||
AllowCredentials: s.config.Cors.AllowCredentials,
|
||||
OptionsPassthrough: true,
|
||||
|
||||
Reference in New Issue
Block a user