Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Site needs to http -> https redirect #2

Open
Shepard opened this issue Jul 23, 2023 · 2 comments
Open

Site needs to http -> https redirect #2

Shepard opened this issue Jul 23, 2023 · 2 comments

Comments

@Shepard
Copy link

Shepard commented Jul 23, 2023

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
Copy link
Author

Shepard commented Jul 23, 2023

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

@thewhodidthis
Copy link
Contributor

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

@hkolbeck hkolbeck changed the title JS error when opening an image file: crypto.subtle is undefined Site needs to http -> https redirect Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants