Skip to content

Commit

Permalink
fix(project): 修复https反向代理的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
lixin59 committed Feb 21, 2024
1 parent 0d392e8 commit 8a9c20d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/api/websocket/url.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if (import.meta.env.DEV) {

const localhost = testHost || window.location.host;

export const baseUrl = `ws://${localhost}/ws/`;
export const baseUrl = `${document.location.protocol === 'https:' ? 'wss' : 'ws'}://${localhost}/ws/`;

export const url = {
index: 'index',
Expand Down

0 comments on commit 8a9c20d

Please sign in to comment.