Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
westsurname authored Aug 4, 2024
1 parent fac2add commit e5e16a1
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions plex_authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from shared.shared import watchlist, plexHeaders, tokensFilename
from shared.overseerr import getUserForPlexToken
from shared.plex import getServerToken
from werkzeug.serving import run_simple
from werkzeug.middleware.proxy_fix import ProxyFix
from werkzeug.middleware.dispatcher import DispatcherMiddleware

Expand Down Expand Up @@ -68,13 +67,10 @@ def updateTokensFile(userId, token, serverToken):

def createResponse(data, statusCode):
response = jsonify(data), statusCode
# response[0].headers.add('Access-Control-Allow-Origin', '*')
# response[0].headers.add('Access-Control-Allow-Headers', 'Content-Type')
# response[0].headers.add('Access-Control-Allow-Methods', 'POST, OPTIONS')
return response

app.wsgi_app = ProxyFix(app.wsgi_app, x_for=1, x_proto=1, x_host=1, x_port=1, x_prefix=1)
app.wsgi_app = DispatcherMiddleware(run_simple, {'/auth': app.wsgi_app})
app.wsgi_app = DispatcherMiddleware(None, {'/auth': app.wsgi_app})

if __name__ == '__main__':
app.run('127.0.0.1', 12598)

0 comments on commit e5e16a1

Please sign in to comment.