diff --git a/infra/authentik/bootstrap-dev.py b/infra/authentik/bootstrap-dev.py index fb8296d..2264354 100644 --- a/infra/authentik/bootstrap-dev.py +++ b/infra/authentik/bootstrap-dev.py @@ -26,6 +26,7 @@ GROUP_SPECS = [ ("nodedc:launcher:user", False), ("nodedc:taskmanager:admin", False), ("nodedc:taskmanager:user", False), + ("nodedc:bim:access", False), ] APP_SPECS = [ diff --git a/infra/reverse-proxy/Caddyfile b/infra/reverse-proxy/Caddyfile index 3ee4b32..95b626a 100644 --- a/infra/reverse-proxy/Caddyfile +++ b/infra/reverse-proxy/Caddyfile @@ -45,3 +45,11 @@ http://{$TASK_DOMAIN:task.local.nodedc} { header_up X-Forwarded-For {remote_host} } } + +http://{$BIM_DOMAIN:bim.local.nodedc} { + reverse_proxy {$LOCAL_BIM_VIEWER_UPSTREAM:host.docker.internal:8080} { + header_up Host {host} + header_up X-Forwarded-Proto {scheme} + header_up X-Forwarded-For {remote_host} + } +} diff --git a/infra/reverse-proxy/Caddyfile.staging b/infra/reverse-proxy/Caddyfile.staging index ece6046..3f5acd6 100644 --- a/infra/reverse-proxy/Caddyfile.staging +++ b/infra/reverse-proxy/Caddyfile.staging @@ -14,6 +14,10 @@ http://{$TASK_DOMAIN} { redir https://{host}{uri} permanent } +http://{$BIM_DOMAIN} { + redir https://{host}{uri} permanent +} + {$AUTH_DOMAIN} { header { Strict-Transport-Security "max-age=31536000; includeSubDomains" @@ -55,3 +59,15 @@ http://{$TASK_DOMAIN} { header_up X-Forwarded-For {remote_host} } } + +{$BIM_DOMAIN} { + header { + Strict-Transport-Security "max-age=31536000; includeSubDomains" + } + + reverse_proxy {$STAGING_BIM_VIEWER_UPSTREAM} { + header_up Host {host} + header_up X-Forwarded-Proto {scheme} + header_up X-Forwarded-For {remote_host} + } +} diff --git a/infra/synology/Caddyfile.http b/infra/synology/Caddyfile.http index 4bbe9dc..87160b5 100644 --- a/infra/synology/Caddyfile.http +++ b/infra/synology/Caddyfile.http @@ -48,6 +48,16 @@ http://{$TASK_DOMAIN} { } } +http://{$BIM_DOMAIN:bim.nodedc.ru} { + reverse_proxy {$SYNOLOGY_BIM_VIEWER_UPSTREAM:ndc-beam-viewer:8080} { + header_up Host {http.request.host} + header_up X-Forwarded-Host {http.request.host} + header_up X-Forwarded-Proto {scheme} + header_up X-Forwarded-Port {$NODEDC_PUBLIC_HTTP_PORT} + header_up X-Forwarded-For {remote_host} + } +} + http://id.nodedc.ru { @auth_admin path /if/admin /if/admin/* respond @auth_admin 404