Skip to content

Conversation

itowlson
Copy link
Contributor

@itowlson itowlson commented Mar 6, 2025

No description provided.

Copy link
Contributor Author

@itowlson itowlson Mar 6, 2025

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

@itowlson itowlson force-pushed the hot-link-protection branch from 2f812f7 to ef251ce Compare March 6, 2025 22:30
Signed-off-by: itowlson <[email protected]>
@itowlson itowlson force-pushed the hot-link-protection branch from ef251ce to 76dc641 Compare March 10, 2025 21:23
Copy link
Member

@vdice vdice left a 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.
Copy link
Member

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

@vdice vdice Jul 15, 2025

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.

Copy link
Member

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?

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

Successfully merging this pull request may close these issues.

2 participants