Html works but JS Image loading cause CORS error

I try to found solution my self (JS ES6) but find only-partially. We are able to load img from no-CORS support src into canvas but browser switch cavnas into ‘taint mode’ which not allow us to call toDataURL (and any other access to content). function loadImgAsBase64(url, callback) { let canvas = document.createElement(‘CANVAS’); let img = … Read more

How to prevent a file from direct URL Access?

Try the following: RewriteEngine on RewriteCond %{HTTP_REFERER} !^http://(www\.)?localhost [NC] RewriteCond %{HTTP_REFERER} !^http://(www\.)?localhost.*$ [NC] RewriteRule \.(gif|jpg)$ – [F] Returns 403, if you access images directly, but allows them to be displayed on site. Note: It is possible that when you open some page with image and then copy that image’s path into the address bar you … Read more

tech