alt-text-org / my.alt-text.org

A set of tools for alt text users and writers
GNU General Public License v3.0
37 stars 7 forks source link

Site needs to http -> https redirect #2

Open Shepard opened 1 year ago

Shepard commented 1 year ago
Uncaught (in promise) TypeError: crypto.subtle is undefined
    onloadend http://my-alt-text-org.glitch.me/src/images.js:6
    hashImage http://my-alt-text-org.glitch.me/src/images.js:5
    hashImage http://my-alt-text-org.glitch.me/src/images.js:2
    loadFile http://my-alt-text-org.glitch.me/src/canvas.js:79
    fromURL http://my-alt-text-org.glitch.me/lib/fabric.min.js:21623
    onLoadCallback http://my-alt-text-org.glitch.me/lib/fabric.min.js:1100
    loadImage http://my-alt-text-org.glitch.me/lib/fabric.min.js:1104
    fromURL http://my-alt-text-org.glitch.me/lib/fabric.min.js:21622
    loadFile http://my-alt-text-org.glitch.me/src/canvas.js:74
    <anonymous> http://my-alt-text-org.glitch.me/src/canvas.js:60
    EventListener.handleEvent* http://my-alt-text-org.glitch.me/src/canvas.js:58
images.js:6:30
Shepard commented 1 year ago

As discussed on Mastodon, this only happens when opening the page on a non-https URL.

thewhodidthis commented 1 year ago

Hi @Shepard, thanks for flagging. Since the SubtleCrypto interface is indeed only available in secure contexts, this is more of a side effect of Glitch offers no built-in option for enforcing HTTP to HTTPS redirects. We could be switching to GitHub pages or some other environment for staging at some point, but for the time being it should work fine if running on localhost, x