Project setup
This commit is contained in:
parent
6c45dec07b
commit
95a21d6f50
29 changed files with 12083 additions and 77 deletions
17
pages/api/auth/[...nextauth].ts
Normal file
17
pages/api/auth/[...nextauth].ts
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import NextAuth from "next-auth";
|
||||
import Google from "next-auth/providers/google";
|
||||
import Apple from "next-auth/providers/apple";
|
||||
|
||||
export default NextAuth({
|
||||
providers: [
|
||||
Google({
|
||||
clientId: process.env.GOOGLE_CLIENT_ID,
|
||||
clientSecret: process.env.GOOGLE_CLIENT_SECRET,
|
||||
}),
|
||||
Apple({
|
||||
clientId: process.env.APPLE_CLIENT_ID,
|
||||
clientSecret: process.env.APPLE_CLIENT_SECRET
|
||||
}),
|
||||
],
|
||||
secret: process.env.NEXTAUTH_SECRET,
|
||||
});
|
||||
18
pages/api/proxy/[[...path]].ts
Normal file
18
pages/api/proxy/[[...path]].ts
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import { createProxyMiddleware } from "http-proxy-middleware";
|
||||
import { NextApiRequest, NextApiResponse } from "next";
|
||||
|
||||
const proxy = createProxyMiddleware({
|
||||
target: "https://help.cdr.link",
|
||||
changeOrigin: true,
|
||||
xfwd: false,
|
||||
pathRewrite: { '^/zammad': '' }
|
||||
});
|
||||
|
||||
export default proxy;
|
||||
|
||||
export const config = {
|
||||
api: {
|
||||
bodyParser: false,
|
||||
externalResolver: true,
|
||||
},
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue