fix: mercure credentials for prod

This commit is contained in:
ext.jeremy.guillot@maxicoffee.domains
2025-02-01 19:08:50 +01:00
parent 59cf4cd3c1
commit 447f1fbe84
3 changed files with 3 additions and 3 deletions

View File

@@ -31,7 +31,7 @@ export default class extends Controller {
const mercureHubUrl = 'https://mangarr.test.nestor-server.fr/.well-known/mercure'; const mercureHubUrl = 'https://mangarr.test.nestor-server.fr/.well-known/mercure';
const eventSource = new EventSource(`${mercureHubUrl}?topic=activity`); const eventSource = new EventSource(`${mercureHubUrl}?topic=activity`, {withCredentials: true});
eventSource.onmessage = (event) => { eventSource.onmessage = (event) => {
const data = JSON.parse(event.data); const data = JSON.parse(event.data);

View File

@@ -12,7 +12,7 @@ export default class extends Controller {
this.totalPages = 0; this.totalPages = 0;
const mercureHubUrl = 'https://mangarr.test.nestor-server.fr/.well-known/mercure'; const mercureHubUrl = 'https://mangarr.test.nestor-server.fr/.well-known/mercure';
this.eventSource = new EventSource(`${mercureHubUrl}?topic=activity`); this.eventSource = new EventSource(`${mercureHubUrl}?topic=activity`, {withCredentials: true});
this.eventSource.onmessage = this.handleMessage.bind(this); this.eventSource.onmessage = this.handleMessage.bind(this);
} }

View File

@@ -10,7 +10,7 @@ export default class extends Controller {
connect() { connect() {
const topic = this.data.get('topic'); const topic = this.data.get('topic');
const mercureHubUrl = 'https://mangarr.test.nestor-server.fr/.well-known/mercure'; const mercureHubUrl = 'https://mangarr.test.nestor-server.fr/.well-known/mercure';
const eventSource = new EventSource(`${mercureHubUrl}?topic=${topic}`); const eventSource = new EventSource(`${mercureHubUrl}?topic=${topic}`, {withCredentials: true});
eventSource.onmessage = (event) => { eventSource.onmessage = (event) => {
const data = JSON.parse(event.data); const data = JSON.parse(event.data);