1
0
mirror of https://github.com/axllent/mailpit.git synced 2025-03-17 21:18:19 +02:00

UI: Allow reverse proxy subdirectories

This commit is contained in:
Ralph Slooten 2022-09-14 13:43:38 +12:00
parent 6b2e5b2e41
commit 33dcd489eb

View File

@ -275,7 +275,9 @@ export default {
// websocket connect
connect: function () {
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;
ws.onmessage = function (e) {
let response = JSON.parse(e.data);