mirror of
https://github.com/furyhawk/agent_alpha.git
synced 2026-07-21 10:35:34 +00:00
- Added token management functions in frontend API for storing and retrieving auth tokens. - Created authentication routes in backend for user registration, login, and profile retrieval. - Implemented JWT token creation and validation for secure user sessions. - Updated frontend API calls to include authorization headers for protected routes. - Added bcrypt dependency for password hashing in user registration.
30 lines
1.1 KiB
Nginx Configuration File
30 lines
1.1 KiB
Nginx Configuration File
server {
|
|
listen 80;
|
|
server_name localhost;
|
|
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
# ── API proxy ─────────────────────────────────────────────────
|
|
# Container runtime (Docker/Podman) resolves backend:8000 via
|
|
# its built-in DNS. nginx caches the resolved IP at startup, so
|
|
# restarting the backend container needs a frontend restart too.
|
|
location /api/ {
|
|
proxy_pass http://backend:8000;
|
|
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_connect_timeout 30s;
|
|
proxy_read_timeout 200s;
|
|
proxy_send_timeout 200s;
|
|
}
|
|
|
|
# ── Static files ──────────────────────────────────────────────
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
expires 1y;
|
|
add_header Cache-Control "public, immutable";
|
|
}
|
|
}
|