Skip to content

Commit ee49c84

Browse files
committed
Update hub URL to the new "/.well-known/mercure"
1 parent 3354d3c commit ee49c84

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

backend/app.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const publisherJwtKey = process.env.MERCURE_PUBLISHER_JWT_KEY;
3737
console.log(`Sending datas: ${JSON.stringify(data)}`);
3838
await request.post(
3939
{
40-
url: `https://${endpoint}/hub`,
40+
url: `https://${endpoint}/.well-known/mercure`,
4141
auth: { bearer },
4242
form: { topic, data: JSON.stringify(data) },
4343
agentOptions: { rejectUnauthorized: false } // Just for debug, should always be set to true or commented!

frontend/subscriber.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<script type="application/javascript">
99
const endpoint = '<XXXXXX>.stackhero-network.com'; // PUT YOUR SERVER URL
1010

11-
const url = new URL('https://' + endpoint + '/hub');
11+
const url = new URL('https://' + endpoint + '/.well-known/mercure');
1212
const main = document.getElementById('main');
1313

1414
// Add topics to listen to

frontend/subscriberWithAuthorization.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
const subscriberJws = ''; // PUT YOUR SUBSCRIBER JWS
1616

1717

18-
const url = new URL('https://' + endpoint + '/hub');
18+
const url = new URL('https://' + endpoint + '/.well-known/mercure');
1919

2020
// Add topic to listen to
2121
url.searchParams.append('topic', `https://${endpoint}` + '/users/1234');

0 commit comments

Comments
 (0)