mirror of
https://github.com/halverneus/static-file-server.git
synced 2025-02-05 15:55:30 +00:00
Add cors headers if config is set to true
This commit is contained in:
parent
91c955e52e
commit
f3f9442821
@ -61,6 +61,11 @@ func handlerSelector() (handler http.HandlerFunc) {
|
||||
if !config.Get.ShowListing {
|
||||
handler = handle.IgnoreIndex(handler)
|
||||
}
|
||||
|
||||
if config.Get.Cors {
|
||||
handler = handle.AddCorsHeaders(handler)
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user