Add cors headers if config is set to true

This commit is contained in:
Demi [Alvaro Martinez de Miguel] 2019-10-16 14:26:09 +02:00
parent 91c955e52e
commit f3f9442821

View File

@ -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
}