Commit 7745af49 authored by nanahira's avatar nanahira

related options

parent 20613d07
Pipeline #429 passed with stages
in 6 minutes and 15 seconds
......@@ -17,7 +17,15 @@ async function main() {
app.set("trust proxy", config.trustedProxies);
app.all('*', function (req, res, next) {
res.header("Cache-Control", "no-cache");
res.header('Access-Control-Allow-Origin', '*');
if (req.method.toLowerCase() == 'options') {
res.send(200);
} else {
next();
}
});
app.get("/api/get", async (req: express.Request, res: express.Response) => {
const addr = req.ip;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment