android version
This commit is contained in:
@@ -51,7 +51,7 @@ app.use(cors({
|
||||
origin: (origin, callback) => {
|
||||
// Erlaube Requests ohne Origin (z.B. Postman, mobile Apps)
|
||||
if (!origin) return callback(null, true);
|
||||
|
||||
|
||||
if (allowedOrigins.includes(origin) || !IS_PRODUCTION) {
|
||||
callback(null, true);
|
||||
} else {
|
||||
@@ -174,7 +174,7 @@ setupBroadcast(io, __dirname);
|
||||
// SPA-Fallback muss nach allen anderen Routen stehen
|
||||
if (IS_PRODUCTION) {
|
||||
const distPath = join(__dirname, '../docroot/dist');
|
||||
const KNOWN_SPA_ROUTES = new Set(['/', '/partners', '/feedback', '/faq', '/regeln', '/sicherheit', '/mockup-redesign']);
|
||||
const KNOWN_SPA_ROUTES = new Set(['/', '/partners', '/feedback', '/faq', '/regeln', '/sicherheit', '/datenschutz', '/mockup-redesign']);
|
||||
app.use(express.static(distPath));
|
||||
// Fallback für Vue Router (SPA) - muss am Ende stehen
|
||||
app.get('*', (req, res) => {
|
||||
@@ -202,7 +202,10 @@ if (IS_PRODUCTION) {
|
||||
}
|
||||
|
||||
// Server starten
|
||||
const HOST = '127.0.0.1'; // Nur localhost, da Apache als Reverse Proxy fungiert
|
||||
// In Production laeuft Apache als Reverse Proxy auf localhost.
|
||||
// In Development kann HOST=0.0.0.0 gesetzt werden, damit echte Android-Geraete
|
||||
// im selben WLAN den lokalen Server erreichen.
|
||||
const HOST = process.env.HOST || '127.0.0.1';
|
||||
|
||||
server.listen(PORT, HOST, () => {
|
||||
console.log(`Server läuft auf http://${HOST}:${PORT}`);
|
||||
@@ -212,4 +215,3 @@ server.listen(PORT, HOST, () => {
|
||||
console.log('Production-Modus: HTTPS über Apache Reverse Proxy');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -202,6 +202,30 @@ const seoData = {
|
||||
},
|
||||
inLanguage: 'de-DE'
|
||||
}
|
||||
},
|
||||
'/datenschutz': {
|
||||
title: 'Datenschutzerklärung für Website und App - SingleChat',
|
||||
description: 'Datenschutzerklärung für SingleChat und die Android-App mit Informationen zu Profilangaben, Nachrichten, Bildern und Sitzungsdaten.',
|
||||
keywords: 'datenschutz singlechat, privacy policy chat app, chat datenschutz, android app datenschutz',
|
||||
ogTitle: 'Datenschutzerklärung für Website und App - SingleChat',
|
||||
ogDescription: 'Informationen zur Datenverarbeitung bei SingleChat und in der Android-App.',
|
||||
ogType: 'website',
|
||||
ogUrl: `${SITE_URL}/datenschutz`,
|
||||
ogImage: DEFAULT_IMAGE,
|
||||
robots: 'index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1',
|
||||
schema: {
|
||||
'@context': 'https://schema.org',
|
||||
'@type': 'WebPage',
|
||||
name: 'Datenschutz - SingleChat',
|
||||
url: `${SITE_URL}/datenschutz`,
|
||||
description: 'Datenschutzerklärung für SingleChat und die Android-App mit Informationen zu Profilangaben, Nachrichten, Bildern und Sitzungsdaten.',
|
||||
isPartOf: {
|
||||
'@type': 'WebSite',
|
||||
name: 'SingleChat',
|
||||
url: `${SITE_URL}/`
|
||||
},
|
||||
inLanguage: 'de-DE'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -449,6 +473,7 @@ Allow: /feedback
|
||||
Allow: /faq
|
||||
Allow: /regeln
|
||||
Allow: /sicherheit
|
||||
Allow: /datenschutz
|
||||
Disallow: /api/
|
||||
Disallow: /static/logs/
|
||||
Disallow: /mockup-redesign
|
||||
|
||||
Reference in New Issue
Block a user