mirror of
https://github.com/axllent/mailpit.git
synced 2025-08-13 20:04:49 +02:00
UI: Allow reverse proxy subdirectories
This commit is contained in:
@@ -275,7 +275,9 @@ export default {
|
|||||||
// websocket connect
|
// websocket connect
|
||||||
connect: function () {
|
connect: function () {
|
||||||
let wsproto = location.protocol == 'https:' ? 'wss' : 'ws';
|
let wsproto = location.protocol == 'https:' ? 'wss' : 'ws';
|
||||||
let ws = new WebSocket(wsproto + "://" + document.location.host + "/api/events");
|
let ws = new WebSocket(
|
||||||
|
wsproto + "://" + document.location.host + document.location.pathname + "api/events"
|
||||||
|
);
|
||||||
let self = this;
|
let self = this;
|
||||||
ws.onmessage = function (e) {
|
ws.onmessage = function (e) {
|
||||||
let response = JSON.parse(e.data);
|
let response = JSON.parse(e.data);
|
||||||
|
Reference in New Issue
Block a user