mirror of
https://github.com/bingohuang/docker-labs.git
synced 2025-10-24 20:45:04 +08:00
Add content-type in CORS allowed headers for microsoft edge to work =S
This commit is contained in:
2
api.go
2
api.go
@@ -90,7 +90,7 @@ func main() {
|
||||
|
||||
go func() {
|
||||
log.Println("Listening on port " + strconv.Itoa(portNumber))
|
||||
log.Fatal(http.ListenAndServe("0.0.0.0:"+strconv.Itoa(portNumber), gh.CORS(gh.AllowCredentials(), gh.AllowedHeaders([]string{"x-requested-with"}), gh.AllowedOrigins([]string{"*"}))(n)))
|
||||
log.Fatal(http.ListenAndServe("0.0.0.0:"+strconv.Itoa(portNumber), gh.CORS(gh.AllowCredentials(), gh.AllowedHeaders([]string{"x-requested-with", "content-type"}), gh.AllowedOrigins([]string{"*"}))(n)))
|
||||
}()
|
||||
|
||||
ssl := mux.NewRouter()
|
||||
|
||||
Reference in New Issue
Block a user