Skip to content

Commit 8fb1d3d

Browse files
committed
fix: ensure host URLs are properly formatted by stripping trailing slashes
1 parent 8cc132b commit 8fb1d3d

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

packages/notifications-library/src/notifications_library/templates/on_account_requested.email.content.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{% extends 'base.html' %}
22
{% block title %} {% include 'on_account_requested.email.subject.txt' %} {% endblock %}
33
{% block content %}
4-
<p>Dear Support team
4+
<p>Dear Support team</p>
55

66
<p>
77
We have received the following request form for an account in :
88
<ol>
99
<li>Product: <b>{{ product.display_name }}</b></li>
10-
<li>Host: <b>{{ host }}</b></li>
11-
<li>PO center: <b>https://{{host}}/#/review-users</b></li>
10+
<li>Host: <b>{{ host|rstrip('/') }}</b></li>
11+
<li>PO center: <b>https://{{ host|rstrip('/') }}/#/review-users</b></li>
1212
</ol>
1313
</p>
1414

packages/notifications-library/src/notifications_library/templates/on_account_requested.email.content.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ Dear Support team,
22

33
We have received the following request form for an account in :
44
- Product: **{{ product.display_name }}**
5-
- Host: **{{ host }}**
6-
- PO center: https://{{host}}/#/review-users
5+
- Host: **{{ host|rstrip('/') }}**
6+
- PO center: https://{{ host|rstrip('/') }}/#/review-users
77
{{ dumps(request_form) }}
88

99
Some details about the requested product follow:

services/web/server/src/simcore_service_webserver/templates/common/request_account.jinja2

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
Request for an Account in {{ host }}
1+
Request for an Account in {{ host|rstrip('/') }}
22
<!--
33
NOTE: this header is only for testing purposes and removed automatically before sending
4-
TEST host:{{ host }}
4+
TEST host:{{ host|rstrip('/') }}
55
TEST name:{{ name }}
66
TEST product:{{ product }}
77
TEST request_form:{{ request_form }}
@@ -14,8 +14,8 @@ Dear {{ name }},
1414
We have received the following request form for an account in :
1515
<ol>
1616
<li>Product: <b>{{ product.display_name }}</b></li>
17-
<li>Host: <b>{{ host }}</b></li>
18-
<li>PO center: <b>https://{{host}}/#/review-users</b></li>
17+
<li>Host: <b>{{ host|rstrip('/') }}</b></li>
18+
<li>PO center: <b>https://{{ host|rstrip('/') }}/#/review-users</b></li>
1919
</ol>
2020
</p>
2121

0 commit comments

Comments
 (0)