Skip to content

Commit 11a735c

Browse files
committed
Add Access-Control-Allow-Headers
1 parent 358ad6d commit 11a735c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

features/cors.feature

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Feature: CORS
1010
"""
1111
Access-Control-Allow-Origin: tus-server.org
1212
Access-Control-Allow-Methods: POST, GET, HEAD, PATCH, DELETE, OPTIONS
13-
Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Upload-Length, Upload-Offset, Tus-Resumable, Upload-Metadata, Upload-Defer-Length, Upload-Concat
13+
Access-Control-Allow-Headers: Authorization, Origin, X-Requested-With, X-Request-ID, X-HTTP-Method-Override, Content-Type, Upload-Length, Upload-Offset, Tus-Resumable, Upload-Metadata, Upload-Defer-Length, Upload-Concat
1414
Access-Control-Max-Age: 86400
1515
"""
1616

lib/tus/server.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ def handle_cors!
396396

397397
if request.options?
398398
response.headers["Access-Control-Allow-Methods"] = "POST, GET, HEAD, PATCH, DELETE, OPTIONS"
399-
response.headers["Access-Control-Allow-Headers"] = "Origin, X-Requested-With, Content-Type, Upload-Length, Upload-Offset, Tus-Resumable, Upload-Metadata, Upload-Defer-Length, Upload-Concat"
399+
response.headers["Access-Control-Allow-Headers"] = "Authorization, Origin, X-Requested-With, X-Request-ID, X-HTTP-Method-Override, Content-Type, Upload-Length, Upload-Offset, Tus-Resumable, Upload-Metadata, Upload-Defer-Length, Upload-Concat"
400400
response.headers["Access-Control-Max-Age"] = "86400"
401401
else
402402
response.headers["Access-Control-Expose-Headers"] = "Upload-Offset, Location, Upload-Length, Tus-Version, Tus-Resumable, Tus-Max-Size, Tus-Extension, Upload-Metadata, Upload-Defer-Length, Upload-Concat"

0 commit comments

Comments
 (0)