Skip to content

Commit

Permalink
fix: add headers to http + tests
Browse files Browse the repository at this point in the history
Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>
  • Loading branch information
fzipi committed Dec 13, 2024
1 parent ffe412f commit 04c3b3f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/verifyimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,11 @@ jobs:
- name: Verify ${{ matrix.target }}
run: |
[ $(docker inspect ${{ matrix.target }}-test --format='{{.State.Running}}') = 'true' ]
if "${{ matrix.target }}" == "nginx" ; then
curl -q -D headers.txt http://localhost:8080/?test=../../etc/passwd
grep -q "HTTP/1.1 403 Forbidden" headers.txt
grep -q "Access-Control-Allow-Origin: *" headers.txt
grep -q "Access-Control-Max-Age: 3600" headers.txt
grep -q "Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS" headers.txt
grep -q "Access-Control-Allow-Headers: *" headers.txt
fi
1 change: 1 addition & 0 deletions nginx/templates/conf.d/default.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ server {
return 301 https://$host$request_uri;
}

include includes/cors.conf;
include includes/proxy_backend.conf;

index index.html index.htm;
Expand Down

0 comments on commit 04c3b3f

Please sign in to comment.