diff --git a/.github/workflows/android-release.yml b/.github/workflows/android-release.yml index a5cb102..d5dd4fb 100644 --- a/.github/workflows/android-release.yml +++ b/.github/workflows/android-release.yml @@ -16,11 +16,11 @@ on: workflow_dispatch: inputs: official: - description: 'Publier une release versionnée officielle (sinon build latest)' + description: 'Publish an official versioned release (otherwise latest build)' type: boolean default: false prerelease: - description: 'Si officielle, marquer comme pré-release' + description: 'If official, mark it as a pre-release' type: boolean default: false diff --git a/app.json b/app.json index 5a3703d..80ed211 100644 --- a/app.json +++ b/app.json @@ -3,7 +3,7 @@ "name": "BeHide", "slug": "behide", "owner": "bysimeit", - "version": "2.0.0", + "version": "1.0.0", "scheme": "behide", "orientation": "portrait", "icon": "./assets/images/icon.png", diff --git a/server/src/index.js b/server/src/index.js index c40ae5b..80ece9f 100644 --- a/server/src/index.js +++ b/server/src/index.js @@ -104,12 +104,37 @@ const landing = readFileSync( join(dirname(fileURLToPath(import.meta.url)), "landing.html"), ); +const SITE = "https://behide.xeron.be"; + +const robots = `User-agent: *\nAllow: /\nSitemap: ${SITE}/sitemap.xml\n`; + +const sitemap = ` + + ${SITE}/ + +`; + const server = createServer((req, res) => { + const path = (req.url ?? "/").split("?")[0]; + + if (req.method === "GET" && path === "/robots.txt") { + res.writeHead(200, { "content-type": "text/plain; charset=utf-8" }); + res.end(robots); + return; + } + + if (req.method === "GET" && path === "/sitemap.xml") { + res.writeHead(200, { "content-type": "application/xml; charset=utf-8" }); + res.end(sitemap); + return; + } + if (req.method === "GET" && (req.headers.accept ?? "").includes("text/html")) { res.writeHead(200, { "content-type": "text/html; charset=utf-8" }); res.end(landing); return; } + res.writeHead(200, { "content-type": "text/plain; charset=utf-8" }); res.end("BeHide relay OK\n"); }); diff --git a/server/src/landing.html b/server/src/landing.html index b3b3936..7599b09 100644 --- a/server/src/landing.html +++ b/server/src/landing.html @@ -5,6 +5,36 @@ BeHide, anonymous end-to-end encrypted messenger + + + + + + + + + + + + + + + +