Skip to content

Commit

Permalink
changement de check-auth-vnc avec l'header
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexTheGeek committed Jan 30, 2024
1 parent d5e651b commit ea6a9da
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,9 +441,10 @@ def check_auth():
logger.info("Authentication check: "+current_user.email+", role: "+current_user.role+", id: "+current_user.id)
return jsonify({'message': 'Authentication check successful'})

@app.route('/check-auth-vnc/<uri>')
@app.route('/check-auth-vnc')
@login_required
def check_auth_vnc(uri):
def check_auth_vnc():
uri = request.headers.get('X-Original-URI')
part_after_equal = uri.split('=', 1)[1]
token_url = part_after_equal.split('&', 1)[0]
vm = VM.query.filter_by(vncurl=token_url).first()
Expand Down

0 comments on commit ea6a9da

Please sign in to comment.