Commit ยท
55bfca2
1
Parent(s): 000cbfa
Add privacy policy and terms of service pages for Google OAuth verification
Browse files
server.js
CHANGED
|
@@ -4073,42 +4073,16 @@ app.get('/terms', (req, res) => {
|
|
| 4073 |
|
| 4074 |
// Sitemap.xml
|
| 4075 |
app.get('/sitemap.xml', (req, res) => {
|
| 4076 |
-
const
|
| 4077 |
-
|
| 4078 |
-
|
| 4079 |
-
|
| 4080 |
-
|
| 4081 |
-
|
| 4082 |
-
|
| 4083 |
-
|
| 4084 |
-
|
| 4085 |
-
|
| 4086 |
-
<loc>${baseUrl}/api-docs</loc>
|
| 4087 |
-
<lastmod>${new Date().toISOString().split('T')[0]}</lastmod>
|
| 4088 |
-
<changefreq>weekly</changefreq>
|
| 4089 |
-
<priority>0.8</priority>
|
| 4090 |
-
</url>
|
| 4091 |
-
<url>
|
| 4092 |
-
<loc>${baseUrl}/privacy</loc>
|
| 4093 |
-
<lastmod>${new Date().toISOString().split('T')[0]}</lastmod>
|
| 4094 |
-
<changefreq>monthly</changefreq>
|
| 4095 |
-
<priority>0.5</priority>
|
| 4096 |
-
</url>
|
| 4097 |
-
<url>
|
| 4098 |
-
<loc>${baseUrl}/terms</loc>
|
| 4099 |
-
<lastmod>${new Date().toISOString().split('T')[0]}</lastmod>
|
| 4100 |
-
<changefreq>monthly</changefreq>
|
| 4101 |
-
<priority>0.5</priority>
|
| 4102 |
-
</url>
|
| 4103 |
-
<url>
|
| 4104 |
-
<loc>${baseUrl}/api/health</loc>
|
| 4105 |
-
<lastmod>${new Date().toISOString().split('T')[0]}</lastmod>
|
| 4106 |
-
<changefreq>hourly</changefreq>
|
| 4107 |
-
<priority>0.3</priority>
|
| 4108 |
-
</url>
|
| 4109 |
-
</urlset>`;
|
| 4110 |
-
res.header('Content-Type', 'application/xml');
|
| 4111 |
-
res.send(sitemap);
|
| 4112 |
});
|
| 4113 |
|
| 4114 |
// Robots.txt
|
|
|
|
| 4073 |
|
| 4074 |
// Sitemap.xml
|
| 4075 |
app.get('/sitemap.xml', (req, res) => {
|
| 4076 |
+
const filePath = path.join(__dirname, 'public', 'sitemap.xml');
|
| 4077 |
+
if (fs.existsSync(filePath)) {
|
| 4078 |
+
res.sendFile(filePath);
|
| 4079 |
+
} else {
|
| 4080 |
+
// ุงูููุฏ ุงูุฏููุงู
ููู ุงููู ุนูุฏู
|
| 4081 |
+
const baseUrl = process.env.BASE_URL || 'https://mgzon-server.hf.space';
|
| 4082 |
+
const sitemap = `...`;
|
| 4083 |
+
res.header('Content-Type', 'application/xml');
|
| 4084 |
+
res.send(sitemap);
|
| 4085 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4086 |
});
|
| 4087 |
|
| 4088 |
// Robots.txt
|