feat: Update frontend and backend configurations for development environment - Downgrade PyP100 version in requirements.txt for compatibility. - Add new frontend routes for index, login, dashboard, printers, jobs, and profile pages. - Modify docker-compose files for development setup, including environment variables and service names. - Update Caddyfile for local development with Raspberry Pi backend. - Adjust health check route to use updated backend URL. - Enhance setup-backend-url.sh for development environment configuration. """
55 lines
1.5 KiB
Caddyfile
55 lines
1.5 KiB
Caddyfile
{
|
|
debug
|
|
}
|
|
|
|
# Entwicklungsumgebung - Localhost und Raspberry Pi Backend
|
|
localhost, 127.0.0.1 {
|
|
# API Anfragen zum Raspberry Pi Backend weiterleiten
|
|
@api {
|
|
path /api/* /health
|
|
}
|
|
handle @api {
|
|
uri strip_prefix /api
|
|
reverse_proxy 192.168.0.105:5000 {
|
|
header_up Host {upstream_hostport}
|
|
header_up X-Real-IP {remote_host}
|
|
header_up X-Forwarded-For {remote_host}
|
|
header_up X-Forwarded-Proto {scheme}
|
|
}
|
|
}
|
|
|
|
# Alle anderen Anfragen zum Frontend weiterleiten
|
|
handle {
|
|
reverse_proxy myp-rp-dev:3000 {
|
|
header_up Host {upstream_hostport}
|
|
header_up X-Real-IP {remote_host}
|
|
header_up X-Forwarded-For {remote_host}
|
|
header_up X-Forwarded-Proto {scheme}
|
|
}
|
|
}
|
|
|
|
# TLS für Entwicklung deaktiviert
|
|
tls off
|
|
|
|
# OAuth Callbacks für Entwicklung
|
|
@oauth path /auth/login/callback*
|
|
handle @oauth {
|
|
header Cache-Control "no-cache"
|
|
reverse_proxy myp-rp-dev:3000
|
|
}
|
|
|
|
# Entwicklungsfreundliche Header
|
|
header {
|
|
# Weniger restriktive Sicherheitsheader für Entwicklung
|
|
X-Content-Type-Options "nosniff"
|
|
X-Frame-Options "SAMEORIGIN"
|
|
|
|
# Keine Caches für Entwicklung
|
|
Cache-Control "no-store, no-cache, must-revalidate"
|
|
|
|
# CORS für Entwicklung
|
|
Access-Control-Allow-Origin "*"
|
|
Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
|
|
Access-Control-Allow-Headers "Content-Type, Authorization"
|
|
}
|
|
} |