Is it possible to remove/disable UNPKG entirely or load it from our domain? Our project should no have any 3rd party scripts. For example jquery is uploaded already to assets and works fine:
<script src="{{asset "built/jquery.js"}}"></script>
Otherwise we have do downgrade and think about migrating to another blog platform. Thanks.
If you are referring to the portal script then yes, you can load it from your own server.
Thanks! Should I just upload this code https://unpkg.com/@tryghost/portal@~1.1.0/umd/portal.min.js and add it like: <script src=“{{asset “built/portal.min.js”}}”>
I made a little “instruction” article. If you need any additional help, let me know.
https://thebear.dev/ghost-how-to-change-the-portal-by-loading-the-script-from-your-theme/
1 Like
Here is another thread with some other approaches:
Further to this, I was able to disable the inclusion of the portal script from unpkg by manually commenting out the following line of code (181) in my installation:
Doesn’t seem to have caused major adverse effects so far (I have only done a cursory smoke test) - of course this is only a manual workaround and not ideal because I can’t automatically update my deployment without this patch.
But it might help those who want to temporarily disable this until the feature flag idea is reviewed by…
1 Like
Boryl
April 15, 2021, 8:17am
7
Is it correct to disable it?
"portal": {
"url": "none"
}
Try and see. I loaded an empty file on my local install without breaking anything.