diff options
| author | IT Fixcomart <it@fixcomart.co.id> | 2024-06-28 03:26:38 +0000 |
|---|---|---|
| committer | trisusilo <tri.susilo@altama.co.id> | 2024-06-28 03:26:38 +0000 |
| commit | def7fc2f1201286c44545e1305ca9f11eb16f3d0 (patch) | |
| tree | 4c65db77b9aa28f3dd53ce514de9d918440c2887 /next.config.js | |
| parent | 98d4f9564bfba66687848b335026bddb6f4dc5b6 (diff) | |
| parent | 936f7f9fb1c6951e02dd8a5f7e85fb8d39cc7e6a (diff) | |
Merged in promotion-program (pull request #140)
Promotion program
Approved-by: trisusilo
Diffstat (limited to 'next.config.js')
| -rw-r--r-- | next.config.js | 26 |
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: '*' } + ] + } + ] } } |
