diff options
author | 2021-06-19 11:18:55 +0200 | |
---|---|---|
committer | 2021-06-19 11:18:55 +0200 | |
commit | aa8a0d08501cbb22400a67ece85c45fdfbdc6131 (patch) | |
tree | 4a4581fb8f1c9bf8cac742be15d7a57eec170a1b /internal/router | |
parent | update CONTRIBUTING with css bundling instructions, and go fmt (#48) (diff) | |
download | gotosocial-aa8a0d08501cbb22400a67ece85c45fdfbdc6131.tar.xz |
Streaming (#49)
Add new status and notification websocket streaming capabilities
Diffstat (limited to 'internal/router')
-rw-r--r-- | internal/router/router.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/router/router.go b/internal/router/router.go index adfd2ce6f..e575b112f 100644 --- a/internal/router/router.go +++ b/internal/router/router.go @@ -128,9 +128,9 @@ func New(config *config.Config, logger *logrus.Logger) (Router, error) { AllowAllOrigins: true, AllowBrowserExtensions: true, AllowMethods: []string{"POST", "PUT", "DELETE", "GET", "PATCH", "OPTIONS"}, - AllowHeaders: []string{"Origin", "Content-Length", "Content-Type", "Authorization"}, + AllowHeaders: []string{"Origin", "Content-Length", "Content-Type", "Authorization", "Upgrade", "Sec-WebSocket-Extensions", "Sec-WebSocket-Key", "Sec-WebSocket-Protocol", "Sec-WebSocket-Version", "Connection"}, AllowWebSockets: true, - ExposeHeaders: []string{"Link", "X-RateLimit-Reset", "X-RateLimit-Limit", " X-RateLimit-Remaining", "X-Request-Id"}, + ExposeHeaders: []string{"Link", "X-RateLimit-Reset", "X-RateLimit-Limit", " X-RateLimit-Remaining", "X-Request-Id", "Connection", "Sec-WebSocket-Accept", "Upgrade"}, MaxAge: 2 * time.Minute, })) engine.MaxMultipartMemory = 8 << 20 // 8 MiB |