diff options
author | Sebastien Douheret <sebastien.douheret@iot.bzh> | 2017-05-22 23:58:31 +0200 |
---|---|---|
committer | Sebastien Douheret <sebastien.douheret@iot.bzh> | 2017-05-25 00:17:51 +0200 |
commit | 66496d63e16635d72f15abe48dc3dadb473f0b6b (patch) | |
tree | f451ec49e07886168ac843fa564e55e97ade182c /lib/webserver/server.go | |
parent | 7f1db509a2076311c280964715962df71a1631ce (diff) |
Rework development page: Pre-build, Build, Populate.
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
Diffstat (limited to 'lib/webserver/server.go')
-rw-r--r-- | lib/webserver/server.go | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/webserver/server.go b/lib/webserver/server.go index 774195c..4268b40 100644 --- a/lib/webserver/server.go +++ b/lib/webserver/server.go @@ -154,12 +154,10 @@ func (s *Server) middlewareXDSDetails() gin.HandlerFunc { // CORS middleware func (s *Server) middlewareCORS() gin.HandlerFunc { return func(c *gin.Context) { - if c.Request.Method == "OPTIONS" { c.Header("Access-Control-Allow-Origin", "*") c.Header("Access-Control-Allow-Headers", "Content-Type") - c.Header("Access-Control-Allow-Methods", "POST, DELETE, GET, PUT") - c.Header("Content-Type", "application/json") + c.Header("Access-Control-Allow-Methods", "GET, POST, DELETE") c.Header("Access-Control-Max-Age", cookieMaxAge) c.AbortWithStatus(204) return |