Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-tus
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
libvmod-tus
Commits
50be1af8
Unverified
Commit
50be1af8
authored
Oct 01, 2021
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve CORS check
parent
ca076230
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
plain_cors.vtc
src/vtc/plain_cors.vtc
+15
-0
No files found.
src/vtc/plain_cors.vtc
View file @
50be1af8
...
...
@@ -115,6 +115,19 @@ client c2 {
rxresp
expect resp.http.Access-Control-Allow-Origin == http://my-cors-origin
# partial Upload with create
txreq -method OPTIONS \
-hdr "Origin: http://my-cors-origin"
rxresp
expect resp.status == 204
expect resp.http.Tus-Resumable == "1.0.0"
expect resp.http.Tus-Version == "1.0.0"
expect resp.http.Tus-Extension == "creation,creation-with-upload,expiration,termination,concatenation"
expect resp.http.Access-Control-Allow-Origin == http://my-cors-origin
expect resp.http.Access-Control-Allow-Methods == "POST, GET, HEAD, PATCH, DELETE, OPTIONS"
expect resp.http.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"
expect resp.http.Tus-Max-Size == 3145
# partial Upload with create
txreq -method POST \
-hdr "Upload-Metadata: filename d29ybGRfZG9taW5hdGlvbl9wbGFuLnBkZg==,is_confidential" \
...
...
@@ -138,6 +151,7 @@ client c2 {
expect resp.http.Upload-Metadata == "filename d29ybGRfZG9taW5hdGlvbl9wbGFuLnBkZg==,is_confidential"
expect resp.http.Location == "http://localhost/vtc"
expect resp.http.Access-Control-Allow-Origin == http://my-cors-origin
expect resp.http.Access-Control-Expose-Headers == "Upload-Offset, Content-Location, Location, Upload-Length, Tus-Version, Tus-Resumable, Tus-Max-Size, Tus-Extension, Upload-Metadata, Upload-Defer-Length, Upload-Concat"
expect resp.http.has-filename == true
expect resp.http.has-is_confidential == true
...
...
@@ -165,6 +179,7 @@ client c2 {
## XXX only for HEAD?
expect resp.http.Upload-Metadata == "filename d29ybGRfZG9taW5hdGlvbl9wbGFuLnBkZg==,is_confidential"
expect resp.http.Access-Control-Allow-Origin == http://my-cors-origin
expect resp.http.Access-Control-Expose-Headers == "Upload-Offset, Content-Location, Location, Upload-Length, Tus-Version, Tus-Resumable, Tus-Max-Size, Tus-Extension, Upload-Metadata, Upload-Defer-Length, Upload-Concat"
expect resp.http.has-filename == true
expect resp.http.has-is_confidential == true
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment