Skip to content

Commit

Permalink
🐛 fix redirect url name
Browse files Browse the repository at this point in the history
  • Loading branch information
ncvescera committed Oct 1, 2024
1 parent d9aea80 commit 1392e1e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
app.logger.debug(f"Setting secret key: {app.config['SECRET_KEY']}")
app.secret_key = app.config['SECRET_KEY']

app.public_url = app.config['WEB_PUBLIC_URL']

app.logger.debug("Setting REDIS ip and password: %s %s", app.config['REDIS_IP'], app.config['REDIS_PASSWORD'])
app.redis_ip = app.config['REDIS_IP']
app.redis_password = app.config['REDIS_PASSWORD']
Expand Down
1 change: 1 addition & 0 deletions src/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
VAULT_CLIENT_ID = os.getenv('VAULT_CLIENT_ID')
VAULT_CLIENT_SECRET = os.getenv('VAULT_CLIENT_SECRET')
VAULT_CONF_URL = os.getenv('VAULT_CONF_URL')
WEB_PUBLIC_URL = os.getenv('WEB_PUBLIC_URL')
SECRET_KEY = os.getenv('SECRET_KEY')
ADMIN_USERS = json.loads(os.getenv('ADMIN_USERS'))
REDIS_IP = os.getenv('REDIS_IP')
Expand Down
3 changes: 2 additions & 1 deletion src/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ def homepage():
@app.route('/login')
def login():
app.logger.debug('Redirecting to Vault')
redirect_uri = url_for('auth', _external=True)
# redirect_uri = url_for('auth', _external=True)
redirect_uri = f"{app.public_url}/auth"
return oauth.vault.authorize_redirect(redirect_uri)


Expand Down

0 comments on commit 1392e1e

Please sign in to comment.