Respect baseUrl while pushing to Ghost
This commit is contained in:
parent
c49836bec7
commit
adcf2b4e46
1 changed files with 2 additions and 1 deletions
|
@ -97,11 +97,12 @@ function mediumFetch(e) {
|
|||
function ghostPush(e) {
|
||||
if(e) { e.preventDefault() }
|
||||
|
||||
const baseUrl = document.querySelector('[data-seance-url]').dataset.seanceUrl
|
||||
let postSlug = document.querySelector('[data-post-slug]').dataset.postSlug
|
||||
var password = document.querySelector('input[name=password]').value
|
||||
console.log('Pushing ' + postSlug)
|
||||
const socketProtocol = (window.location.protocol === 'https:' ? 'wss:' : 'ws:')
|
||||
const socketUrl = socketProtocol + '//' + window.location.host + '/ws/push-ghost/'
|
||||
const socketUrl = socketProtocol + '//' + baseUrl + '/ws/push-ghost/'
|
||||
const socket = new WebSocket(socketUrl)
|
||||
|
||||
// set up the div
|
||||
|
|
Loading…
Reference in a new issue