Add favicon

This commit is contained in:
benthecarman
2023-02-22 14:12:35 -06:00
parent 5e38cc35aa
commit b23c4a3c89
2 changed files with 4 additions and 0 deletions

View File

@@ -227,6 +227,10 @@ pub async fn main(req: Request, env: Env, _ctx: Context) -> Result<Response> {
}); });
Response::from_websocket(pair.client) Response::from_websocket(pair.client)
}) })
.get("/favicon.ico", |_, _| {
let bytes: Vec<u8> = include_bytes!("../static/favicon.ico").to_vec();
Response::from_bytes(bytes)?.with_cors(&cors())
})
.options("/*catchall", |_, _| empty_response()) .options("/*catchall", |_, _| empty_response())
.run(req, env) .run(req, env)
.await .await

BIN
static/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB