website: enable cors, allow requests to gaufre.js from any site
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
import { join } from "path"
|
||||
import Fastify from "fastify"
|
||||
import fsfStatic from "@fastify/static"
|
||||
import fsfCors from "@fastify/cors"
|
||||
|
||||
const fastify = Fastify({
|
||||
logger: true,
|
||||
})
|
||||
|
||||
fastify.register(fsfCors)
|
||||
|
||||
fastify.register(fsfStatic, {
|
||||
root: join(import.meta.dirname, process.env.STATIC_DIR || "dist"),
|
||||
preCompressed: true,
|
||||
|
||||
Reference in New Issue
Block a user