Commit b0d77964 authored by Jens Melgard Churchill's avatar Jens Melgard Churchill
Browse files

Added support for reverse_proxy root_path

parent 9ee392a8
Showing with 3 additions and 2 deletions
+3 -2
......@@ -31,6 +31,7 @@ HTTP_PORT="$(echo "$USER" | pcre2grep -o1 '(\d+)$' | xargs -I {} echo '9000+{}'
HTTP_PORT="${HTTP_PORT:-9000}"
if [ "$HTTP_PORT" -ge 9000 ]; then
ID="$(echo "$HTTP_PORT - 9000" | bc)"
BIND="$HTTP_HOST:$HTTP_PORT"
if curl -so /dev/null "$BIND"; then
......@@ -38,9 +39,9 @@ if [ "$HTTP_PORT" -ge 9000 ]; then
echo "Re-starting service on $BIND..."
else
echo "Starting service $BIND..."
fi
fi
hypercorn --debug --bind "$BIND" --log-level info "main:app" &>".main.log" &
hypercorn --debug --bind "$BIND" --log-level info --root-path="/$ID" "main:app" &>".main.log" &
n=0
started=0
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment