Add 404 handling for /src/ paths in production environment
This commit is contained in:
1
client/dist/assets/index-BDGOYe7r.css
vendored
Normal file
1
client/dist/assets/index-BDGOYe7r.css
vendored
Normal file
File diff suppressed because one or more lines are too long
17
client/dist/assets/index-bwTGxV8Y.js
vendored
Normal file
17
client/dist/assets/index-bwTGxV8Y.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
client/dist/assets/socket-vendor-CUkmNz_4.js
vendored
Normal file
1
client/dist/assets/socket-vendor-CUkmNz_4.js
vendored
Normal file
File diff suppressed because one or more lines are too long
38
client/dist/assets/vue-vendor-Cw5ghJsv.js
vendored
Normal file
38
client/dist/assets/vue-vendor-Cw5ghJsv.js
vendored
Normal file
File diff suppressed because one or more lines are too long
38
client/dist/index.html
vendored
Normal file
38
client/dist/index.html
vendored
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="de">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>SingleChat - Chat, Single-Chat und Bildaustausch</title>
|
||||||
|
<meta name="description" content="Willkommen auf SingleChat - deine erste Adresse für Chat, Single-Chat und Bildaustausch. Chatte mit Menschen aus aller Welt, finde neue Kontakte und teile Erinnerungen sicher und komfortabel.">
|
||||||
|
<meta name="keywords" content="Chat, Single-Chat, Bildaustausch, Online-Chat, Singles, Kontakte, Community">
|
||||||
|
<meta name="robots" content="index, follow">
|
||||||
|
|
||||||
|
<!-- Open Graph Tags -->
|
||||||
|
<meta property="og:title" content="SingleChat - Chat, Single-Chat und Bildaustausch">
|
||||||
|
<meta property="og:description" content="Willkommen auf SingleChat - deine erste Adresse für Chat, Single-Chat und Bildaustausch.">
|
||||||
|
<meta property="og:type" content="website">
|
||||||
|
<meta property="og:url" content="https://ypchat.net/">
|
||||||
|
<meta property="og:image" content="https://ypchat.net/static/favicon.png">
|
||||||
|
|
||||||
|
<!-- Twitter Card -->
|
||||||
|
<meta name="twitter:card" content="summary">
|
||||||
|
<meta name="twitter:title" content="SingleChat - Chat, Single-Chat und Bildaustausch">
|
||||||
|
<meta name="twitter:description" content="Willkommen auf SingleChat - deine erste Adresse für Chat, Single-Chat und Bildaustausch.">
|
||||||
|
<meta name="twitter:image" content="https://ypchat.net/static/favicon.png">
|
||||||
|
|
||||||
|
<!-- Canonical URL -->
|
||||||
|
<link rel="canonical" href="https://ypchat.net/">
|
||||||
|
|
||||||
|
<!-- Favicon -->
|
||||||
|
<link rel="icon" type="image/png" href="/static/favicon.png">
|
||||||
|
<script type="module" crossorigin src="/assets/index-bwTGxV8Y.js"></script>
|
||||||
|
<link rel="modulepreload" crossorigin href="/assets/vue-vendor-Cw5ghJsv.js">
|
||||||
|
<link rel="modulepreload" crossorigin href="/assets/socket-vendor-CUkmNz_4.js">
|
||||||
|
<link rel="stylesheet" crossorigin href="/assets/index-BDGOYe7r.css">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="app"></div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
@@ -106,6 +106,11 @@ if (IS_PRODUCTION) {
|
|||||||
if (IS_PRODUCTION && (req.path === '/' || req.path === '/partners')) {
|
if (IS_PRODUCTION && (req.path === '/' || req.path === '/partners')) {
|
||||||
return; // Route wurde bereits behandelt
|
return; // Route wurde bereits behandelt
|
||||||
}
|
}
|
||||||
|
// In Production: /src/ Pfade sollten nicht existieren (404)
|
||||||
|
if (IS_PRODUCTION && req.path.startsWith('/src/')) {
|
||||||
|
res.status(404).send('Not found');
|
||||||
|
return;
|
||||||
|
}
|
||||||
// Nur für nicht-API und nicht-static Requests
|
// Nur für nicht-API und nicht-static Requests
|
||||||
if (!req.path.startsWith('/api') && !req.path.startsWith('/static') && req.path !== '/robots.txt' && req.path !== '/sitemap.xml') {
|
if (!req.path.startsWith('/api') && !req.path.startsWith('/static') && req.path !== '/robots.txt' && req.path !== '/sitemap.xml') {
|
||||||
res.sendFile(join(distPath, 'index.html'));
|
res.sendFile(join(distPath, 'index.html'));
|
||||||
|
|||||||
Reference in New Issue
Block a user