ssr
Gitea Actions Demo / build_and_push (push) Successful in 52s
Details
Gitea Actions Demo / build_and_push (push) Successful in 52s
Details
This commit is contained in:
parent
95687bda3a
commit
115bbae1ee
15
nginx.conf
15
nginx.conf
|
|
@ -39,16 +39,13 @@ http {
|
|||
proxy_set_header Cookie $http_cookie;
|
||||
}
|
||||
|
||||
# Landing page: SSR if no auth cookie, SPA if has token
|
||||
# Landing page — always SSR (server checks auth cookie, redirects if present)
|
||||
location = / {
|
||||
hascookie token .;
|
||||
if ($cookie_token = "") {
|
||||
proxy_pass http://127.0.0.1:3001;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Cookie $http_cookie;
|
||||
}
|
||||
root /usr/share/nginx/html;
|
||||
try_files /index.html =404;
|
||||
proxy_pass http://127.0.0.1:3001;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Cookie $http_cookie;
|
||||
}
|
||||
|
||||
# Everything else → SPA
|
||||
|
|
|
|||
Loading…
Reference in New Issue