summaryrefslogtreecommitdiffstats
path: root/lib/webserver/server.go
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2017-05-22 23:58:31 +0200
committerSebastien Douheret <sebastien.douheret@iot.bzh>2017-05-25 00:17:51 +0200
commit66496d63e16635d72f15abe48dc3dadb473f0b6b (patch)
treef451ec49e07886168ac843fa564e55e97ade182c /lib/webserver/server.go
parent7f1db509a2076311c280964715962df71a1631ce (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.go4
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