-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e8088a0
commit f9b80ce
Showing
1 changed file
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
events { | ||
|
||
worker_connections 1024; | ||
} | ||
|
||
http { | ||
|
||
upstream frontend_service { | ||
|
||
server 0.0.0.0:80; | ||
keepalive 120; | ||
} | ||
|
||
limit_req_zone $binary_remote_addr zone=frontend_service_rate_limiting_zone:10m rate=1000r/m; | ||
limit_req_status 429; | ||
|
||
server { | ||
|
||
listen 80; | ||
server_name 0.0.0.0; | ||
|
||
location / { | ||
|
||
limit_req zone=frontend_service_rate_limiting_zone; | ||
|
||
proxy_http_version 1.1; | ||
proxy_pass http://frontend_service/; | ||
|
||
proxy_buffering off; | ||
|
||
proxy_set_header Host $host; | ||
proxy_set_header Connection "upgrade"; | ||
proxy_set_header Upgrade $http_upgrade; | ||
|
||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-Host $host; | ||
proxy_set_header X-Forwarded-Port $server_port; | ||
|
||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
|
||
} | ||
|
||
} | ||
|
||
} |