summaryrefslogtreecommitdiff
path: root/next.config.js
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2024-06-10 16:53:28 +0700
committerit-fixcomart <it@fixcomart.co.id>2024-06-10 16:53:28 +0700
commit5e5b67e5b98d3183044dc5149fe67a29feeb3c41 (patch)
tree11776ab7470ef0a555c6eec93bd79dca1189721e /next.config.js
parentc88d98f06a6301bad6dd6d2e58b4908d8562638c (diff)
<iman> update promotion-program
Diffstat (limited to 'next.config.js')
-rw-r--r--next.config.js26
1 files changed, 23 insertions, 3 deletions
diff --git a/next.config.js b/next.config.js
index 8e1ceda3..12aa2f3e 100644
--- a/next.config.js
+++ b/next.config.js
@@ -1,9 +1,9 @@
/** @type {import('next').NextConfig} */
const withPWA = require('next-pwa')({
dest: 'public',
- register: true,
- disable: process.env.NODE_ENV === 'development',
- skipWaiting: true
+ register: true,
+ disable: process.env.NODE_ENV === 'development',
+ skipWaiting: true
})
const nextConfig = {
@@ -30,6 +30,26 @@ const nextConfig = {
hostname: 'erp.indoteknik.com'
}
]
+ },
+ async rewrites() {
+ return [
+ {
+ source: '/solr/:path*',
+ destination: 'http://34.101.189.218:8983/solr/:path*' // Proxy to Solr
+ }
+ ]
+ },
+ async headers() {
+ return [
+ {
+ source: '/solr/:path*',
+ headers: [
+ { key: 'Access-Control-Allow-Origin', value: '*' },
+ { key: 'Access-Control-Allow-Methods', value: 'GET, POST, OPTIONS, PUT, DELETE' },
+ { key: 'Access-Control-Allow-Headers', value: '*' }
+ ]
+ }
+ ]
}
}