stylegan-web icon indicating copy to clipboard operation
stylegan-web copied to clipboard

Clipboard Error on HTTP server

Open BarisSari opened this issue 3 years ago • 2 comments

Hi,

When I run the project locally, clipboard functionality works fine. However, when I try to run the project on a server (for example, AWS EC2 instance), copy to latent code buttons and hash copy-paste in merger page do not work because of this issue: navigator.clipboard is undefined

resim

What I've learned is clipboard doesn't work with unsecured applications. So, it's necessary to run flask over HTTPS if you would like to use clipboard functionalities. If you think that this functionality is not necessary, at least it might be good to add a note in README.md.

BarisSari avatar Oct 15 '20 10:10 BarisSari

Yes, the web security issues also annoy me.

When serve on LAN, the simple solution is run the flask as a https server by a self-signed certificate. And then you will encounter "dangerous" warning in browser, then you must click "advance->proceed to insecurity" or something. That should thank to Google's https everywhere policy.

Maybe in future we should design a latent code file format, and offer input by file dragging-dropping, and also easy to storage and sharing.

k-l-lambda avatar Oct 16 '20 01:10 k-l-lambda

When serve on LAN, the simple solution is run the flask as a https server by a self-signed certificate. And then you will encounter "dangerous" warning in browser, then you must click "advance->proceed to insecurity" or something. That should thank to Google's https everywhere policy.

I've added a dummy self-signed SSL for now. Chrome doesn't let me to proceed but Firefox is more relaxed and it's working there.

Maybe in future we should design a latent code file format, and offer input by file dragging-dropping, and also easy to storage and sharing.

Yes, I think it would be a good solution.

BarisSari avatar Oct 16 '20 10:10 BarisSari