Catalyst / admin/Bid-Sentinel 14.8 GB / 57.8 GB 40.0 GB free
Help Sign in

admin / Bid-Sentinel

public

Bid Scrape and Tracking Application with AI Capability

Code Issues Pull requests Pipelines Packages Security Insights Wiki Settings
Bid-Sentinel / bid-sentinel-v2 / frontend / nginx.conf 1044 B · main
 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
28
29
30
31
32
server {
    listen 80;
    server_name _;

    root /usr/share/nginx/html;
    index index.html;

    # Reverse-proxy the API on the SAME origin as the web app. The browser calls
    # /api/... on whatever host:port it loaded the page from, and nginx forwards
    # to the backend container. This removes any dependency on "localhost" and
    # works identically on the Docker host or any remote machine.
    location /api/ {
        proxy_pass http://backend:8000/;
        proxy_http_version 1.1;
        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 X-Forwarded-Proto $scheme;
        proxy_read_timeout 120s;
    }

    # Static asset caching.
    location /assets/ {
        expires 7d;
        add_header Cache-Control "public, max-age=604800, immutable";
    }

    # SPA fallback: route all unknown paths to index.html so React Router works.
    location / {
        try_files $uri $uri/ /index.html;
    }
}