summaryrefslogtreecommitdiff
path: root/next.config.js
diff options
context:
space:
mode:
authortrisusilo48 <tri.susilo@altama.co.id>2024-07-02 14:33:25 +0700
committertrisusilo48 <tri.susilo@altama.co.id>2024-07-02 14:33:25 +0700
commite8ad23dbad5e96dddcd6b10bdc46400c6721e80b (patch)
treefafea81669ea00f824260ecb4a0acc9e1096499f /next.config.js
parentc6eec1fcd70c878f9fa4911ae4ebf1a1c97a18b7 (diff)
parent66d787499d0751365c1cda9d79b31e9f3c3c28bc (diff)
Merge branch 'release' into feature/generate_recomendation
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: '*' }
+ ]
+ }
+ ]
}
}