mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-04 17:38:10 +00:00
Co-authored-by: Christopher Oliphant <christopheroliphant@christophersmbp.home>
33 lines
905 B
TypeScript
33 lines
905 B
TypeScript
import { vitePlugin as remix } from "@remix-run/dev";
|
|
import { defineConfig } from "vite";
|
|
import tsconfigPaths from "vite-tsconfig-paths";
|
|
import { netlifyPlugin } from "@netlify/remix-edge-adapter/plugin";
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
remix(),
|
|
netlifyPlugin(),
|
|
tsconfigPaths(),
|
|
{
|
|
name: "configure-response-headers",
|
|
configureServer: (server) => {
|
|
server.middlewares.use((_req, res, next) => {
|
|
res.setHeader("Cross-Origin-Embedder-Policy", "require-corp");
|
|
res.setHeader("Cross-Origin-Opener-Policy", "same-origin");
|
|
next();
|
|
});
|
|
},
|
|
},
|
|
],
|
|
server: {
|
|
proxy: {
|
|
"/v1": "https://api.storyteller.ai",
|
|
"/avatar": "https://www.gravatar.com",
|
|
"/google": {
|
|
target: "https://storage.googleapis.com",
|
|
rewrite: (path) => path.replace(/^\/google/, ""),
|
|
},
|
|
},
|
|
},
|
|
});
|