mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 10:57:04 +08:00
FIX: Make embeddable discourse more forgiving with https
This commit is contained in:
parent
905068cf23
commit
7a01d575c2
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user