Added a security warning to the api

This commit is contained in:
Mathias Wagner
2022-06-09 16:11:53 +00:00
committed by GitHub
parent a73e63bc71
commit 16bf1fb092

View File

@@ -50,6 +50,11 @@ if (process.env.NODE_ENV === 'production') {
app.get('*', (req, res) => {
res.sendFile(path.join(__dirname, '../build', 'index.html'));
});
} else {
app.get("*", (req, res) => {
res.status(500).send("<h2>Diese MySpeed-Instanz befindet sich aktuell im Entwicklungsmodus.<br/><br/>"
+ "Wenn du der Betreiber bist, bitte ändere deine Umgebungsvariable ab.</h2>");
});
}
// Make a speedtest