add MOLLER method

This commit is contained in:
split / May 2023-12-25 16:39:21 -08:00
parent 4c77605b98
commit 1b31ba89d3
5 changed files with 12 additions and 208 deletions

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 448 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 216 KiB

View file

@ -2,6 +2,7 @@ import { serve } from "@hono/node-server"
import { serveStatic } from "@hono/node-server/serve-static"
import { Hono } from "hono"
import fs from "fs"
import { readFile } from "fs/promises"
import Files from "./lib/files"
import { getAccount } from "./lib/middleware"
import APIRouter from "./routes/api"
@ -28,6 +29,17 @@ app.get(
})
)
// respond to the MOLLER method
// get it?
// haha...
app.on(["MOLLER"], "*", async (ctx) => {
ctx.header("Content-Type", "image/webp")
return ctx.body( await readFile("./assets/moller.png") )
})
//app.use(bodyParser.text({limit:(config.maxDiscordFileSize*config.maxDiscordFiles)+1048576,type:["application/json","text/plain"]}))
// check for ssl, if not redirect