mirror of
https://github.com/notherealmarco/WASAPhoto.git
synced 2025-05-05 12:22:35 +02:00
First webui commit
This commit is contained in:
parent
e38f5d08ab
commit
c4611b92f8
2011 changed files with 30382 additions and 1874 deletions
|
@ -1,8 +1,9 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"github.com/gorilla/handlers"
|
||||
"net/http"
|
||||
|
||||
"github.com/gorilla/handlers"
|
||||
)
|
||||
|
||||
// applyCORSHandler applies a CORS policy to the router. CORS stands for Cross-Origin Resource Sharing: it's a security
|
||||
|
@ -11,8 +12,10 @@ import (
|
|||
func applyCORSHandler(h http.Handler) http.Handler {
|
||||
return handlers.CORS(
|
||||
handlers.AllowedHeaders([]string{
|
||||
"x-example-header",
|
||||
"Content-Type",
|
||||
"Authorization",
|
||||
}),
|
||||
handlers.AllowCredentials(),
|
||||
handlers.AllowedMethods([]string{"GET", "POST", "OPTIONS", "DELETE", "PUT"}),
|
||||
handlers.AllowedOrigins([]string{"*"}),
|
||||
)(h)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue