🔧 修改 api 前缀.

This commit is contained in:
lijiahang
2024-05-16 13:53:03 +08:00
parent 9a7437e8db
commit 89d9cd4c25
7 changed files with 17 additions and 17 deletions

View File

@@ -26,16 +26,16 @@ server {
try_files $uri $uri/ /index.html; try_files $uri $uri/ /index.html;
} }
location /orion/api { location /orion-visor/api {
proxy_pass http://localhost:9200/orion/api; proxy_pass http://localhost:9200/orion-visor/api;
proxy_set_header Host $host; proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Proto $scheme;
} }
location /orion/keep-alive { location /orion-visor/keep-alive {
proxy_pass http://localhost:9200/orion/keep-alive; proxy_pass http://localhost:9200/orion-visor/keep-alive;
proxy_http_version 1.1; proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade; proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade"; proxy_set_header Connection "upgrade";

View File

@@ -87,16 +87,16 @@ server {
try_files $uri $uri/ /index.html; try_files $uri $uri/ /index.html;
} }
location /orion/api { location /orion-visor/api {
proxy_pass http://localhost:9200/orion/api; proxy_pass http://localhost:9200/orion-visor/api;
proxy_set_header Host $host; proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Proto $scheme;
} }
location /orion/keep-alive { location /orion-visor/keep-alive {
proxy_pass http://localhost:9200/orion/keep-alive; proxy_pass http://localhost:9200/orion-visor/keep-alive;
proxy_http_version 1.1; proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade; proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade"; proxy_set_header Connection "upgrade";

View File

@@ -1,10 +1,10 @@
{ {
"local": { "local": {
"baseUrl": "http://127.0.0.1:9200/orion/api", "baseUrl": "http://127.0.0.1:9200/orion-visor/api",
"token": "Bearer YQJ3IpwJJv5HujIWY6ZTNDgUxXRY6aDt" "token": "Bearer YQJ3IpwJJv5HujIWY6ZTNDgUxXRY6aDt"
}, },
"gateway": { "gateway": {
"baseUrl": "http://127.0.0.1:9200/orion/api", "baseUrl": "http://127.0.0.1:9200/orion-visor/api",
"token": "Bearer YQJ3IpwJJv5HujIWY6ZTNDgUxXRY6aDt" "token": "Bearer YQJ3IpwJJv5HujIWY6ZTNDgUxXRY6aDt"
} }
} }

View File

@@ -23,7 +23,7 @@ public class BootstrapController {
@Operation(summary = "健康检测") @Operation(summary = "健康检测")
@GetMapping("/health") @GetMapping("/health")
public String health() { public String health() {
return "server ok"; return "ok";
} }
} }

View File

@@ -192,12 +192,12 @@ orion:
version: @revision@ version: @revision@
api: api:
# 公共 api 前缀 # 公共 api 前缀
prefix: /orion/api prefix: /orion-visor/api
# 是否开启跨域 # 是否开启跨域
cors: true cors: true
websocket: websocket:
# 公共 websocket 前缀 # 公共 websocket 前缀
prefix: /orion/keep-alive prefix: /orion-visor/keep-alive
# 1MB # 1MB
binary-buffer-size: 1048576 binary-buffer-size: 1048576
# 1MB # 1MB

View File

@@ -1,4 +1,4 @@
VITE_API_BASE_URL= 'http://127.0.0.1:9200/orion/api' VITE_API_BASE_URL= 'http://127.0.0.1:9200/orion-visor/api'
VITE_WS_BASE_URL= 'ws://127.0.0.1:9200/orion/keep-alive' VITE_WS_BASE_URL= 'ws://127.0.0.1:9200/orion-visor/keep-alive'
VITE_APP_VERSION= '1.1.0' VITE_APP_VERSION= '1.1.0'
VITE_SFTP_PREVIEW_MB= 2 VITE_SFTP_PREVIEW_MB= 2

View File

@@ -1,4 +1,4 @@
VITE_API_BASE_URL= '/orion/api' VITE_API_BASE_URL= '/orion-visor/api'
VITE_WS_BASE_URL= '/orion/keep-alive' VITE_WS_BASE_URL= '/orion-visor/keep-alive'
VITE_APP_VERSION= '1.1.0' VITE_APP_VERSION= '1.1.0'
VITE_SFTP_PREVIEW_MB= 2 VITE_SFTP_PREVIEW_MB= 2