Skip to content

Commit

Permalink
Revert change of REST_URL
Browse files Browse the repository at this point in the history
  • Loading branch information
micafer committed Jun 6, 2024
1 parent 1cab3ab commit 1ef4b5b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion IM/REST.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
</html>
"""


REST_URL = None
app = flask.Flask(__name__)
app.wsgi_app = ProxyFix(app.wsgi_app, x_for=1, x_proto=1, x_host=1, x_port=1, x_prefix=1)
flask_server = None
Expand Down Expand Up @@ -119,6 +119,11 @@ def get_auth_header():
Get the Authentication object from the AUTHORIZATION header
replacing the new line chars.
"""
# Initialize REST_URL
global REST_URL
if REST_URL is None:
REST_URL = flask.request.url_root

auth_header = flask.request.headers['AUTHORIZATION']

user_pass = None
Expand Down

0 comments on commit 1ef4b5b

Please sign in to comment.