Use proxy-safe relative URLs
This commit is contained in:
+2
-2
@@ -146,7 +146,7 @@ function pageScript(slug: string): string {
|
||||
return device + "-" + theme;
|
||||
}
|
||||
function downloadShot(variant) {
|
||||
location.href = "/aishare/${slug}/screenshots/" + variant + ".png";
|
||||
location.href = "screenshots/" + variant + ".png";
|
||||
}
|
||||
var toastTimer;
|
||||
function showToast(message) {
|
||||
@@ -240,7 +240,7 @@ export function renderConversationPage(slug: string, conversation: NormalizedCon
|
||||
</main>
|
||||
<section class="downloads">
|
||||
<div class="downloads-inner">
|
||||
<a class="icon-button" href="/aishare/${slug}/download" aria-label="Download export" title="Download export">${icons.download}</a>
|
||||
<a class="icon-button" href="download" aria-label="Download export" title="Download export">${icons.download}</a>
|
||||
<div class="shot-control">
|
||||
<button class="icon-button shot-main" type="button" data-shot-current aria-label="Download screenshot" title="Download screenshot">${icons.image}</button>
|
||||
<details>
|
||||
|
||||
@@ -66,6 +66,7 @@ function safeSendFrom(root: string, requested: string, res: Response): void {
|
||||
res.sendFile(target);
|
||||
}
|
||||
|
||||
app.use(`${config.basePath}/assets`, express.static(path.resolve("dist-client/assets"), { immutable: true, maxAge: "1y" }));
|
||||
app.use(`${config.basePath}/admin-assets`, express.static(path.resolve("dist-client"), { immutable: true, maxAge: "1y" }));
|
||||
|
||||
app.get(`${config.basePath}/admin`, (_req, res) => {
|
||||
|
||||
Reference in New Issue
Block a user