Skip to content

Commit

Permalink
Minor code change to use the Host header instead of the Origin he…
Browse files Browse the repository at this point in the history
…ader to build the account activation link.
  • Loading branch information
lanmaster53 committed Jun 5, 2024
1 parent 071b0f0 commit 15c6af0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pwnedapi/views/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def post(self):
# create a JWT
activate_token = encode_jwt('new_user', claims=json_data)
# send an email with an activation link using the token
base_url = request.headers['origin']
base_url = f"http://{request.headers['host']}"
link = f"{base_url}/#/signup/activate/{activate_token}"
email = Email(
sender = 'no-reply@pwnedhub.com',
Expand Down

0 comments on commit 15c6af0

Please sign in to comment.