Skip to content

Commit e36f4fe

Browse files
committed
change redirect to apply to base domain rather than assigned static domain
1 parent 40dc0b3 commit e36f4fe

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

views/htmx.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,13 +190,13 @@ async def fetch_paste(self, request: starlette_plus.Request) -> starlette_plus.R
190190
tzinfo=datetime.timezone.utc
191191
)
192192

193-
url: str = f"{CONFIG['SERVER']['domain']}/{identifier}"
194-
raw_url: str = f"{CONFIG['SERVER']['domain']}/raw/{identifier}"
193+
url: str = f"/{identifier}"
194+
raw_url: str = f"/raw/{identifier}"
195195
security_html: str = ""
196196

197197
stored: list[str] = request.session.get("pastes", [])
198198
if identifier in stored:
199-
security_url: str = f"{CONFIG['SERVER']['domain']}/api/security/info/{data['safety']}"
199+
security_url: str = f"/api/security/info/{data['safety']}"
200200

201201
security_html = f"""
202202
<div class="identifierHeaderSection">
@@ -281,7 +281,7 @@ async def htmx_save(self, request: starlette_plus.Request) -> starlette_plus.Res
281281
to_return: dict[str, Any] = paste.serialize(exclude=["password", "password_ok"])
282282
identifier: str = to_return["id"]
283283

284-
url: str = f"{CONFIG['SERVER']['domain']}/{identifier}"
284+
url: str = f"/{identifier}"
285285

286286
try:
287287
(request.session["pastes"].append(identifier))

0 commit comments

Comments
 (0)