mirror of
https://github.com/mollersuite/monofile.git
synced 2024-11-21 21:36:26 -08:00
add MOLLER method
This commit is contained in:
parent
4c77605b98
commit
1b31ba89d3
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 |
|
@ -2,6 +2,7 @@ import { serve } from "@hono/node-server"
|
||||||
import { serveStatic } from "@hono/node-server/serve-static"
|
import { serveStatic } from "@hono/node-server/serve-static"
|
||||||
import { Hono } from "hono"
|
import { Hono } from "hono"
|
||||||
import fs from "fs"
|
import fs from "fs"
|
||||||
|
import { readFile } from "fs/promises"
|
||||||
import Files from "./lib/files"
|
import Files from "./lib/files"
|
||||||
import { getAccount } from "./lib/middleware"
|
import { getAccount } from "./lib/middleware"
|
||||||
import APIRouter from "./routes/api"
|
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"]}))
|
//app.use(bodyParser.text({limit:(config.maxDiscordFileSize*config.maxDiscordFiles)+1048576,type:["application/json","text/plain"]}))
|
||||||
|
|
||||||
// check for ssl, if not redirect
|
// check for ssl, if not redirect
|
||||||
|
|
Loading…
Reference in a new issue