change next config for env
This commit is contained in:
+28
-23
@@ -1,48 +1,53 @@
|
|||||||
import type { NextConfig } from 'next';
|
import type { NextConfig } from "next";
|
||||||
import withPWA from 'next-pwa';
|
import withPWA from "next-pwa";
|
||||||
|
|
||||||
const nextConfig: NextConfig = {
|
const nextConfig: NextConfig = {
|
||||||
output: 'standalone',
|
output: "standalone",
|
||||||
poweredByHeader: false,
|
poweredByHeader: false,
|
||||||
|
env: {
|
||||||
|
NEXT_PUBLIC_API_BASE_URL: process.env.NEXT_PUBLIC_API_BASE_URL,
|
||||||
|
NEXT_PUBLIC_TOKEN_NAME: process.env.NEXT_PUBLIC_TOKEN_NAME,
|
||||||
|
NEXT_PUBLIC_REFRESH_TOKEN_NAME: process.env.NEXT_PUBLIC_REFRESH_TOKEN_NAME,
|
||||||
|
},
|
||||||
images: {
|
images: {
|
||||||
remotePatterns: [
|
remotePatterns: [
|
||||||
{
|
{
|
||||||
protocol: 'https',
|
protocol: "https",
|
||||||
hostname: '**',
|
hostname: "**",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
protocol: 'http',
|
protocol: "http",
|
||||||
hostname: '**',
|
hostname: "**",
|
||||||
},
|
},
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
headers: async () => [
|
headers: async () => [
|
||||||
{
|
{
|
||||||
source: '/:path*',
|
source: "/:path*",
|
||||||
headers: [
|
headers: [
|
||||||
{
|
{
|
||||||
key: 'X-DNS-Prefetch-Control',
|
key: "X-DNS-Prefetch-Control",
|
||||||
value: 'on',
|
value: "on",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'Strict-Transport-Security',
|
key: "Strict-Transport-Security",
|
||||||
value: 'max-age=63072000; includeSubDomains; preload',
|
value: "max-age=63072000; includeSubDomains; preload",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'X-XSS-Protection',
|
key: "X-XSS-Protection",
|
||||||
value: '1; mode=block',
|
value: "1; mode=block",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'X-Frame-Options',
|
key: "X-Frame-Options",
|
||||||
value: 'SAMEORIGIN',
|
value: "SAMEORIGIN",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'X-Content-Type-Options',
|
key: "X-Content-Type-Options",
|
||||||
value: 'nosniff',
|
value: "nosniff",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'Referrer-Policy',
|
key: "Referrer-Policy",
|
||||||
value: 'origin-when-cross-origin',
|
value: "origin-when-cross-origin",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@@ -50,10 +55,10 @@ const nextConfig: NextConfig = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const withPWANextConfig = withPWA({
|
const withPWANextConfig = withPWA({
|
||||||
dest: 'public',
|
dest: "public",
|
||||||
register: true,
|
register: true,
|
||||||
skipWaiting: true,
|
skipWaiting: true,
|
||||||
disable: process.env.NODE_ENV === 'development',
|
disable: process.env.NODE_ENV === "development",
|
||||||
maximumFileSizeToCacheInBytes: 5 * 1024 * 1024, // 5 MB
|
maximumFileSizeToCacheInBytes: 5 * 1024 * 1024, // 5 MB
|
||||||
})(nextConfig);
|
})(nextConfig);
|
||||||
|
|
||||||
|
|||||||
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user