-
Notifications
You must be signed in to change notification settings - Fork 6
Hot link protection #28
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am hoping to be able to replace the redirect with returning this image, but I need some guidance from Fermyon JS folks before I can get that working. If I can't get it working I'll remove the image. Apparently file reading doesn't work
2f812f7
to
ef251ce
Compare
Signed-off-by: itowlson <[email protected]>
ef251ce
to
76dc641
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As mentioned in #28 (comment), it would be nice to have some explicit indicator of the hot link being blocked. As it is, it isn't immediately obvious when viewing the website that the broken image is on account of being blocked or on account of, say, the hot link protection site not running or not available. But again, for sample purposes, perhaps not worth the extra time.
python -m http.server 8080 # or python3 | ||
``` | ||
|
||
Then visit `http://127.0.0.1:8080` to see that the link via the proxy is blocked. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if my system/python, but the command to run the test-site shows the following:
$ python -m http.server 8080
Serving HTTP on :: port 8080 (http://[::]:8080/) ...
and while http://localhost:8080
navigates to the test site correctly, http://127.0.0.1:8080
doesn't (rather, eg curl: (56) Recv failure: Connection reset by peer
occurs).
Do you see the same thing? If so, should we update this to http://localhost:8080
?
<p><img src='https://developer.fermyon.com/static/image/avatar.png' width="200" height="200"></p> | ||
|
||
<p>Here's the same image tag going via the proxy site:</p> | ||
<p><img src='http://localhost:3000/static/image/avatar.png' width="200" height="200"></p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Depending on my other comment (python server only available at localhost:8080
), we may need to change this to 127.0.0.1:3000
so that the hot link protection logic functions as intended.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it worth spelling out how to deploy to FwF? Then a note to update the test-site index.html with the fwf app address?
No description provided.