This commit is contained in:
@@ -143,7 +143,14 @@
|
||||
const previewBody = document.getElementById('previewBody');
|
||||
if (!previewBody) return;
|
||||
|
||||
const url = '{{ share_url }}';
|
||||
let url = '{{ share_url }}';
|
||||
if (window.location.protocol === 'https:' && url.startsWith('http://')) {
|
||||
const parsed = new URL(url);
|
||||
if (parsed.host === window.location.host) {
|
||||
parsed.protocol = 'https:';
|
||||
url = parsed.toString();
|
||||
}
|
||||
}
|
||||
try {
|
||||
const response = await fetch(url, { method: 'GET' });
|
||||
if (!response.ok) {
|
||||
|
||||
Reference in New Issue
Block a user