gjtorikian / html-pipeline

HTML processing filters and utilities
MIT License
2.27k stars 383 forks source link

Add the AssetProxyFilter #379

Closed digitalmoksha closed 1 year ago

digitalmoksha commented 1 year ago

Adds a NodeFilter called AssetProxyFilter, which is based on the original CamoFilter

digitalmoksha commented 1 year ago

@gjtorikian here is a close version of our AssetProxyFilter. Take a look and let me know if there is anything else I need to add.

digitalmoksha commented 1 year ago

I'm also fine and will make the change if you want to keep the original CamoFilter name, this was just the easiest in the moment.

gjtorikian commented 1 year ago

Thank you so much for this, and the test. No need to worry about anything else, I'll cleanup as needed!

OOC, if I am understanding correctly, some other process still uploads the image to the proxy server, yeah?

digitalmoksha commented 1 year ago

No need to worry about anything else, I'll cleanup as needed!

Great, thanks.

Nothing needs to get uploaded to the proxy server. It actually takes the encoded url and makes the request to the real http server, and passes the data back to the client browser. It’s there just so the user’s IP address is not exposed. There is no caching involved. It can impose limits, such as size.

gjtorikian commented 1 year ago

Oh! I see now, sorry—for some reason I thought this was doing something else. Thanks again!