mirror of
https://github.com/discourse/discourse.git
synced 2026-09-05 04:40:41 -05:00
FIX: Make embeddable discourse more forgiving with https
This commit is contained in:
@@ -63,9 +63,13 @@
|
||||
return top;
|
||||
}
|
||||
|
||||
function normalizeUrl(url) {
|
||||
return url.replace(/^https?(\:\/\/)?/, '');
|
||||
}
|
||||
|
||||
function postMessageReceived(e) {
|
||||
if (!e) { return; }
|
||||
if (DE.discourseUrl.indexOf(e.origin) === -1) { return; }
|
||||
if (normalizeUrl(DE.discourseUrl).indexOf(normalizeUrl(e.origin)) === -1) { return; }
|
||||
|
||||
if (e.data) {
|
||||
if (e.data.type === 'discourse-resize' && e.data.height) {
|
||||
|
||||
Reference in New Issue
Block a user