Last active
July 14, 2025 21:04
-
-
Save WebCloud/df8b789e74b90709d5b1e454020f0260 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** @type {import('next').NextConfig} */ | |
const nextConfig = { | |
eslint: { | |
ignoreDuringBuilds: true, | |
}, | |
typescript: { | |
ignoreBuildErrors: true, | |
}, | |
images: { | |
unoptimized: true, | |
}, | |
async rewrites() { | |
return { | |
beforeFiles: [ | |
// Test rewrite - simple case | |
{ | |
source: "/test", | |
destination: "/api/ping", | |
}, | |
// OAuth routes | |
{ | |
source: "/oauth/:path*", | |
destination: "/api/oauth/:path*", | |
}, | |
// OAuth register route (special case) | |
{ | |
source: "/register", | |
destination: "/api/oauth/register", | |
}, | |
// Well-known OAuth endpoints | |
{ | |
source: "/.well-known/oauth-authorization-server", | |
destination: "/api/.well-known/oauth-authorization-server", | |
}, | |
{ | |
source: "/.well-known/oauth-authorization-server/:path*", | |
destination: "/api/.well-known/oauth-authorization-server/:path*", | |
}, | |
{ | |
source: "/.well-known/oauth-protected-resource", | |
destination: "/api/.well-known/oauth-protected-resource", | |
}, | |
], | |
}; | |
}, | |
}; | |
export default nextConfig; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"rewrites": [ | |
{ | |
"source": "/api/(.*)", | |
"destination": "/api" | |
}, | |
{ | |
"source": "/test", | |
"destination": "/api/ping" | |
}, | |
{ | |
"source": "/oauth/(.*)", | |
"destination": "/api/oauth/$1" | |
}, | |
{ | |
"source": "/register", | |
"destination": "/api/oauth/register" | |
}, | |
{ | |
"source": "/.well-known/oauth-authorization-server", | |
"destination": "/api/.well-known/oauth-authorization-server" | |
}, | |
{ | |
"source": "/.well-known/oauth-authorization-server/(.*)", | |
"destination": "/api/.well-known/oauth-authorization-server/$1" | |
}, | |
{ | |
"source": "/.well-known/oauth-protected-resource", | |
"destination": "/api/.well-known/oauth-protected-resource" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment