feat: forgor rate limiting (whoopsies)
This commit is contained in:
parent
5718276179
commit
5c4f331547
2 changed files with 8 additions and 2 deletions
|
|
@ -48,9 +48,9 @@ services:
|
||||||
- '443:443'
|
- '443:443'
|
||||||
depends_on:
|
depends_on:
|
||||||
app:
|
app:
|
||||||
condition: service_healthy
|
condition: service_started
|
||||||
volumes:
|
volumes:
|
||||||
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
|
- ./nginx.conf:/etc/nginx/conf.d/default.conf
|
||||||
- ./.ssl/certs:/etc/nginx/certs:ro
|
- ./.ssl/certs:/etc/nginx/certs:ro
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: [ "CMD", "nc", "-vz", "::1", "80" ]
|
test: [ "CMD", "nc", "-vz", "::1", "80" ]
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
limit_req_zone $binary_remote_addr zone=per_ip:10m rate=10r/s;
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
listen [::]:80;
|
listen [::]:80;
|
||||||
|
|
@ -8,9 +10,13 @@ server {
|
||||||
ssl_certificate_key /etc/nginx/certs/localhost/localhost.key.pem;
|
ssl_certificate_key /etc/nginx/certs/localhost/localhost.key.pem;
|
||||||
ssl_trusted_certificate /etc/nginx/certs/localhost/localhost.fullchain.pem;
|
ssl_trusted_certificate /etc/nginx/certs/localhost/localhost.fullchain.pem;
|
||||||
|
|
||||||
|
client_max_body_size 10m;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://app:3000;
|
proxy_pass http://app:3000;
|
||||||
|
|
||||||
|
limit_req zone=per_ip nodelay;
|
||||||
|
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue