generated from chibat/chrome-extension-typescript-starter
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnext.config.js
69 lines (68 loc) · 1.83 KB
/
next.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
images: {
domains: ["localhost"],
remotePatterns: [
{
// https://icons8.com/icon/z3YMXqHDYl9X/brain
protocol: "https",
hostname: "img.icons8.com",
port: "",
}
],
},
rewrites: async () => {
return [
{
source: "/api/llm/:path*",
destination:
process.env.NODE_ENV === "development"
? "http://127.0.0.1:8000/api/llm/:path*"
: "/api/",
},
];
},
async redirects() {
return [
{
source: '/chrome',
destination: 'https://chrome.google.com/webstore/detail/sniptube-elevate-your-you/fidajdajcfpjlbmgmpbcobkofibhkimk',
permanent: false,
basePath: false
},
{
source: '/firefox',
destination: 'https://addons.mozilla.org/en-US/firefox/addon/sniptube/',
permanent: false,
basePath: false
},
{
source: '/edge',
destination: 'https://microsoftedge.microsoft.com/addons/detail/sniptube-elevate-your-y/hibkflieoofejdponchkigjjklebinia',
permanent: false,
basePath: false
},
{
source: '/safari',
destination: 'https://github.com/psycho-baller/snipTube/blob/main/docs/safari.md',
permanent: false,
basePath: false
},
]
},
async headers() {
return [
{
source: "/api/llm/:path*",
headers: [
{ key: "Access-Control-Allow-Credentials", value: "true" },
{ key: "Access-Control-Allow-Origin", value: "https://www.youtube.com" },
{ key: "Access-Control-Allow-Methods", value: "GET, POST, OPTIONS" },
{ key: "Access-Control-Allow-Headers", value: "Content-Type" },
]
}
]
}
};
module.exports = nextConfig;