mirror of
https://github.com/JefferyHcool/BiliNote.git
synced 2026-08-27 11:11:02 +08:00
Merge pull request #193 from HansYeoh/allow-all-domains
Modify to allow access from all domains
This commit is contained in:
@@ -8,7 +8,7 @@ export default defineConfig(({ mode }) => {
|
|||||||
const env = loadEnv(mode, process.cwd() + '/../')
|
const env = loadEnv(mode, process.cwd() + '/../')
|
||||||
|
|
||||||
const apiBaseUrl = env.VITE_API_BASE_URL || 'http://localhost:8000'
|
const apiBaseUrl = env.VITE_API_BASE_URL || 'http://localhost:8000'
|
||||||
const port = env.VITE_FRONTEND_PORT || 3015
|
const port = parseInt(env.VITE_FRONTEND_PORT || '3015', 10)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
base: './',
|
base: './',
|
||||||
@@ -21,6 +21,7 @@ export default defineConfig(({ mode }) => {
|
|||||||
server: {
|
server: {
|
||||||
host: '0.0.0.0',
|
host: '0.0.0.0',
|
||||||
port: port,
|
port: port,
|
||||||
|
allowedHosts: true, // 允许任意域名访问
|
||||||
proxy: {
|
proxy: {
|
||||||
'/api': {
|
'/api': {
|
||||||
target: apiBaseUrl,
|
target: apiBaseUrl,
|
||||||
|
|||||||
Reference in New Issue
Block a user