1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-08-02 20:15:24 +02:00

fix: log accurate IP (#2416)

* update dev docker poetry install

* Forward/Report IP through front and backend.

* Add fail2ban docs

* fix option name and iproute2 in omni entry

* Fix entry scripts -> gunicorn setting respected

* gunicorn off

* xfwd in nuxt proxy and handle multiple IPs
This commit is contained in:
Jacob Corn 2023-06-25 20:22:21 +02:00 committed by GitHub
parent 5e904d19b4
commit 9557b3f0b6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 39 additions and 22 deletions

View file

@ -50,10 +50,10 @@ init
GUNICORN_PORT=${API_PORT:-9000}
# Start API
if [ "$WEB_GUNICORN" == 'true' ]; then
hostip=`/sbin/ip route|awk '/default/ { print $3 }'`
if [ "$WEB_GUNICORN" = 'true' ]; then
echo "Starting Gunicorn"
gunicorn mealie.app:app -b 0.0.0.0:$GUNICORN_PORT -k uvicorn.workers.UvicornWorker -c /app/gunicorn_conf.py --preload
gunicorn mealie.app:app -b 0.0.0.0:$GUNICORN_PORT --forwarded-allow-ips=$hostip -k uvicorn.workers.UvicornWorker -c /app/gunicorn_conf.py --preload
else
uvicorn mealie.app:app --host 0.0.0.0 --port $GUNICORN_PORT
uvicorn mealie.app:app --host 0.0.0.0 --forwarded-allow-ips=$hostip --port $GUNICORN_PORT
fi