diff --git a/conf/nginx.conf b/conf/nginx.conf index 57e2c51..ef57e3a 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -22,17 +22,17 @@ location __PATH__/ { return 204; } if ($request_method = 'POST') { - more_set_headers "Access-Control-Allow-Origin: * always"; - more_set_headers "Access-Control-Allow-Methods: GET, POST, OPTIONS always"; - more_set_headers "Access-Control-Allow-Headers: DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range always"; - more_set_headers "Access-Control-Expose-Headers: Content-Length,Content-Range always"; + more_set_headers "Access-Control-Allow-Origin: *"; + more_set_headers "Access-Control-Allow-Methods: GET, POST, OPTIONS"; + more_set_headers "Access-Control-Allow-Headers: DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range"; + more_set_headers "Access-Control-Expose-Headers: Content-Length,Content-Range"; } if ($request_method = 'GET') { - more_set_headers "Access-Control-Allow-Origin: * always"; - more_set_headers "Access-Control-Allow-Methods: GET, POST, OPTIONS always"; - more_set_headers "Access-Control-Allow-Headers: DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range always"; - more_set_headers "Access-Control-Expose-Headers: Content-Length,Content-Range always"; + more_set_headers "Access-Control-Allow-Origin: *"; + more_set_headers "Access-Control-Allow-Methods: GET, POST, OPTIONS"; + more_set_headers "Access-Control-Allow-Headers: DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range"; + more_set_headers "Access-Control-Expose-Headers: Content-Length,Content-Range"; } # this is needed if you have file import via upload enabled diff --git a/conf/systemd.service b/conf/systemd.service index 84dd1bb..525c3b1 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -12,6 +12,11 @@ Environment="UVICORN_ROOT_PATH=__PATH__" ExecStart=__INSTALL_DIR__/venv/bin/gunicorn --config __INSTALL_DIR__/gunicorn.conf.py FastAPIAppFolder:app --worker-class uvicorn.workers.UvicornWorker +Restart=on-failure +RestartSec=1s +StartLimitIntervalSec=60 +StartLimitBurst=5 + StandardOutput=syslog StandardError=syslog SyslogIdentifier=__APP__-server