-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnginx.conf
More file actions
27 lines (22 loc) · 840 Bytes
/
nginx.conf
File metadata and controls
27 lines (22 loc) · 840 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
events {}
http {
upstream backend {
server payload-1:3000;
server payload-2:3000;
}
server {
listen 80;
location / {
proxy_pass http://backend;
# `:3000` needed to change `x-forwarded-host` from `localhost` to
# `localhost:3000` and avoid the following error:
# ```
# `x-forwarded-host` header with value `localhost` does not match `origin` header with value `localhost:3000` from a forwarded Server Actions request. Aborting the action.
# ⨯ [Error: Invalid Server Actions request.] { digest: '1725396296' }
# ```
proxy_set_header Host $host:3000;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
}