Slug instead of path in config

This commit is contained in:
austinkelsay 2024-11-15 14:25:39 -06:00
parent cd52755c00
commit e761c0546b
No known key found for this signature in database
GPG Key ID: 44CB4EC6D9F2FA02

View File

@ -27,7 +27,7 @@ module.exports = removeImports({
async headers() {
return [
{
source: "/api/:path*",
source: "/api/:slug*",
headers: [
{
key: "Access-Control-Allow-Origin",
@ -62,12 +62,16 @@ module.exports = removeImports({
value: "max-age=31536000; includeSubDomains; preload"
},
],
source: "/api/.well-known/:path*",
source: "/api/.well-known/:slug*",
headers: [
{
key: "Access-Control-Allow-Origin",
value: "*"
},
{
key: "Access-Control-Allow-Methods",
value: "GET, POST, PUT, DELETE, OPTIONS",
},
{
key: 'Cache-Control',
value: 'no-cache, max-age=0, must-revalidate'