Skip to content

Commit

Permalink
fix: hostname
Browse files Browse the repository at this point in the history
  • Loading branch information
rohan-chaturvedi committed Oct 8, 2023
1 parent 5d4acc8 commit 7a8c962
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backend/api/emails.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def send_inite_email(invite):
invited_by_social_acc = invite.invited_by.user.socialaccount_set.first()
invited_by_name = invited_by_social_acc.extra_data.get('name')
invite_code = encode_string_to_base64(str(invite.id))
invite_link = f"{os.getenv('HTTP_PROTOCOL')}{os.getenv('HOST')}/invite/{invite_code}"
invite_link = f"{getattr(settings, 'HOSTNAME')}/invite/{invite_code}"

context = {
'organisation': organisation,
Expand Down
3 changes: 2 additions & 1 deletion backend/backend/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@

SESSION_COOKIE_AGE = 86400 # 24 hours

HOSTNAME = f"{os.getenv('HTTP_PROTOCOL')}{os.getenv('HOST')}"

# Application definition

INSTALLED_APPS = [
Expand Down Expand Up @@ -267,4 +269,3 @@
APP_HOST = os.getenv('APP_HOST')
except:
APP_HOST = 'self'

0 comments on commit 7a8c962

Please sign in to comment.