Clanek s targetUrl se ob kliku preusmeri (302)
This commit is contained in:
@@ -64,6 +64,10 @@ export function serveStatic(app: Express) {
|
||||
try {
|
||||
const slug = decodeURIComponent(articleMatch[1]);
|
||||
const article = await storage.getArticleBySlug(slug);
|
||||
if (article && (article as any).targetUrl) {
|
||||
res.redirect(302, (article as any).targetUrl);
|
||||
return;
|
||||
}
|
||||
if (article) {
|
||||
const articleUrl = `${canonicalBase}/article/${article.slug}`;
|
||||
const imageUrl = ogImageUrl(article.coverImage || "", canonicalBase);
|
||||
|
||||
Reference in New Issue
Block a user