Files
dashboard/nginx.conf
T
fegger dfe246b7ca Add Outlook unread-mail widget with device-code login
- outlook-auth.js: one-time device-code flow against Microsoft login;
  stores the refresh token in the outlook-tokens compose volume
- update-outlook.js: per-minute cron fetching the unread count and the
  latest unread messages via Microsoft Graph; caches access tokens and
  persists rotated refresh tokens
- Widget is hidden until the mailbox is actually authorized, so it
  stays out of sight while (admin) consent is pending
- New external card for Outlook (Office 365) with the official icon
- compose: pass OUTLOOK_CLIENT_ID/OUTLOOK_TENANT/GITEA_TOKEN from .env
- README: Entra ID app registration steps and the tenant-ID hint for
  directories not resolvable via the organizations endpoint
2026-09-04 17:38:17 +02:00

67 lines
1.8 KiB
Nginx Configuration File

# Custom nginx config (used by the Dockerfile).
# Serves the static dashboard and proxies /api/chat to the Node API backend.
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
# Generated data feed; refresh frequently.
location = /data.json {
add_header Cache-Control "no-cache" always;
}
# Service health checks; refreshed every minute by cron.
location = /health.json {
add_header Cache-Control "no-cache" always;
}
# Outlook unread mail; refreshed every minute by cron.
location = /outlook.json {
add_header Cache-Control "no-cache" always;
}
# Open WebUI chat proxy.
location /api/chat {
proxy_pass http://127.0.0.1:3001;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_read_timeout 120s;
}
# GPU stats proxy (forwarded through the Node backend).
location /api/gpu-stats {
proxy_pass http://127.0.0.1:3001;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_read_timeout 15s;
}
# Ollama loaded-model stats proxy.
location /api/ollama {
proxy_pass http://127.0.0.1:3001;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_read_timeout 15s;
}
location / {
try_files $uri $uri/ =404;
}
# Security headers
add_header X-Content-Type-Options "nosniff" always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
add_header Permissions-Policy "camera=(), microphone=(), geolocation=()" always;
# Hide nginx version
server_tokens off;
access_log off;
error_log /var/log/nginx/error.log warn;
}