aboutsummaryrefslogtreecommitdiff
path: root/front-end/vite.config.local.ts
blob: c93c60c097304e44a2fe0d043682b5fbd8b89296 (plain)
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

import fs from 'fs'

export const server = {
    host: '0.0.0.0',
    port: 8081,
    strictPort: true,
    proxy: {
        '/public': {
            target: 'https://www.vaughnnugent.com/public',
            changeOrigin: true,
            rewrite: (path) => path.replace(/^\/public/, ''),
            headers: {
                //Don't send cookies to the remote server
                'cookies': "",
                "pragma": "no-cache",
                "Connection": "keep-alive",
                "Cache-Control": "no-cache",
            },
        },
        '/api': {
            target: 'http://127.0.0.1:8089',
            changeOrigin: true,
            rewrite: (path) => path.replace(/^\/api/, ''),
            headers: {
                "sec-fetch-mode": "cors",
                "referer": null,
                "origin": "https://127.0.0.1:8080",
                "Connection": "keep-alive",
            }
        }
    },
    https: {
        key: fs.readFileSync('F:\\downloads\\test.pem'),
        cert: fs.readFileSync('F:\\downloads\\cert.pem'),
    }
}