From 1b99787510a3976f20ea857089719c5363d5f611 Mon Sep 17 00:00:00 2001
From: Slavi Pantaleev <slavi@devture.com>
Date: Sat, 10 Jul 2021 19:32:45 +0300
Subject: [PATCH] Match Synapse's CORS headers

Related to https://github.com/matrix-org/synapse/pull/10114
---
 corporal/httpgateway/handler/catchall.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/corporal/httpgateway/handler/catchall.go b/corporal/httpgateway/handler/catchall.go
index 0c638ba..323427c 100644
--- a/corporal/httpgateway/handler/catchall.go
+++ b/corporal/httpgateway/handler/catchall.go
@@ -50,8 +50,8 @@ func (me *catchAllHandler) actionCatchAll(w http.ResponseWriter, r *http.Request
 		logger.Debugf("HTTP gateway: replying to OPTIONS")
 
 		w.Header().Set("Access-Control-Allow-Origin", "*")
-		w.Header().Set("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE, OPTIONS")
-		w.Header().Set("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept, Authorization")
+		w.Header().Set("Access-Control-Allow-Methods", "GET, HEAD, POST, PUT, DELETE, OPTIONS")
+		w.Header().Set("Access-Control-Allow-Headers", "X-Requested-With, Content-Type, Authorization, Date")
 		w.WriteHeader(http.StatusOK)
 		return
 	}