Skip to content

Commit

Permalink
chore: only allow valid http methods
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffreiffers committed Feb 4, 2025
1 parent 3c0d4ee commit 77afaef
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ http {
listen 8080;
server_name default_server;

# Only allow valid HTTP methods
if ($request_method !~ ^(GET|POST|PUT|DELETE|HEAD|OPTIONS|PATCH)$) {
return 405;
}

location ~ /enhetsregisteret/api/enheter/(.*) {
default_type application/json;
proxy_intercept_errors on;
Expand Down

0 comments on commit 77afaef

Please sign in to comment.