mirror of
https://github.com/strapi/strapi.git
synced 2025-11-11 07:39:16 +00:00
strip a single trailing slash from admin url
This commit is contained in:
parent
49d32d001b
commit
7fbad9fb9d
@ -210,7 +210,10 @@ class RemoteStrapiDestinationProvider implements IDestinationProvider {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
const wsProtocol = url.protocol === 'https:' ? 'wss:' : 'ws:';
|
const wsProtocol = url.protocol === 'https:' ? 'wss:' : 'ws:';
|
||||||
const wsUrl = `${wsProtocol}//${url.host}${url.pathname}${TRANSFER_PATH}/push`;
|
const wsUrl = `${wsProtocol}//${url.host}${url.pathname.replace(
|
||||||
|
/\/$/,
|
||||||
|
''
|
||||||
|
)}${TRANSFER_PATH}/push`;
|
||||||
|
|
||||||
// No auth defined, trying public access for transfer
|
// No auth defined, trying public access for transfer
|
||||||
if (!auth) {
|
if (!auth) {
|
||||||
|
|||||||
@ -227,7 +227,10 @@ class RemoteStrapiSourceProvider implements ISourceProvider {
|
|||||||
let ws: WebSocket;
|
let ws: WebSocket;
|
||||||
this.assertValidProtocol(url);
|
this.assertValidProtocol(url);
|
||||||
const wsProtocol = url.protocol === 'https:' ? 'wss:' : 'ws:';
|
const wsProtocol = url.protocol === 'https:' ? 'wss:' : 'ws:';
|
||||||
const wsUrl = `${wsProtocol}//${url.host}${url.pathname}${TRANSFER_PATH}/pull`;
|
const wsUrl = `${wsProtocol}//${url.host}${url.pathname.replace(
|
||||||
|
/\/$/,
|
||||||
|
''
|
||||||
|
)}${TRANSFER_PATH}/pull`;
|
||||||
|
|
||||||
// No auth defined, trying public access for transfer
|
// No auth defined, trying public access for transfer
|
||||||
if (!auth) {
|
if (!auth) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user