feat: /ping

This commit is contained in:
Jozef Steinhübl 2024-03-17 15:49:22 +01:00
parent 679ea98296
commit ee32db2f4d
No known key found for this signature in database
GPG key ID: E944BC293F5FF7E7

View file

@ -27,6 +27,10 @@ export default {
fetch: async (request: Request, env: Env) => { fetch: async (request: Request, env: Env) => {
if (!REDIS) setRedis(Redis.fromEnv(env)); if (!REDIS) setRedis(Redis.fromEnv(env));
if (new URL(request.url).pathname === "/ping") {
return new Response("Pong!", { status: 200 });
}
if ( if (
!request.headers.get("X-Signature-Ed25519") || !request.headers.get("X-Signature-Ed25519") ||
!request.headers.get("X-Signature-Timestamp") !request.headers.get("X-Signature-Timestamp")