if you’re accessing over the internet, always use TLS/HTTPS.
if you’re accessing over LAN, you should still use TLS/HTTPS.
just because you’re hosting the app locally doesn’t mean the JS embedded in the page is safe. HTTPS will ensure that all your traffic is encrypted so only you and the server knows what it contains.






it would if it’s importing something else.
let’s say your site is on https://app.home.com/ and your js is locally sourced. then that JS was injected with an import from http://vuln.evil.com/.
I’m pretty sure your browser would block it based on the fact that the document domain is using HTTPS and HSTS would block it based on not using HTTPS.
I think. never really tried this out tbh.