added redirect service
This commit is contained in:
@@ -2,6 +2,14 @@ server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
|
||||
# redirect service to tethering IP for 'webview kiosk' -> mobile phone to face
|
||||
location /redirect {
|
||||
proxy_pass http://127.0.0.1:8000/redirect;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
}
|
||||
|
||||
# captive portal to face
|
||||
include /opt/helva-robot/drive/etc/nginx/snippets/captive-portal.conf;
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
[Unit]
|
||||
Description=Redirect Tethering IP Service
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
WorkingDirectory=/opt/face
|
||||
ExecStart=/opt/face/venv/bin/python -m uvicorn redirect_tethering_ip:app --host 127.0.0.1 --port 8000 --app-dir /opt/face
|
||||
Restart=always
|
||||
RestartSec=1
|
||||
|
||||
# Tipp: eigener User ist sauber, aber www-data geht auch.
|
||||
User=www-data
|
||||
Group=www-data
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
Reference in New Issue
Block a user