krz/brand-bench
A dynamic brand documentation generator with Ollama integration.
clone: git clone https://gitbay.org/krz/brand-bench.git
1server {
2 listen 80;
3 root /usr/share/nginx/html;
4 index index.html;
5
6 # SPA fallback — let React Router handle unknown paths
7 location / {
8 try_files $uri $uri/ /index.html;
9 }
10
11 # Proxy Ollama's API through the same origin so the browser never has to
12 # make a cross-origin request and CORS is a non-issue.
13 # In the app's Settings panel, set the Ollama base URL to just:
14 # http://<your-server> (no port, no path suffix)
15 location /api/ {
16 proxy_pass http://ollama:11434/api/;
17 proxy_http_version 1.1;
18 proxy_set_header Host $host;
19 proxy_set_header X-Real-IP $remote_addr;
20 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
21
22 # Ollama responses (especially streamed ones) can be large and slow;
23 # disable buffering so cancellation works promptly.
24 proxy_buffering off;
25 proxy_read_timeout 300s;
26 }
27}