Hi everybody!
I am currently hosting my personal website at tommispace.netlify.app. I am placing inside the original website repository the few media files that go with it, and they amount to some 100MB.
Both to reduce the heaviness of my website repository, keeping it shy of media files, but above all to have a future-proof convenient LFS solution, I intend to serve bigger files through Storj Object Storage, that is awesome. Nevertheless, in Storj’s guide to host a static website (hence to host media files, too), it points out that a proxy server is required in order to ensure HTTPS connection:
Without further action, your site will be served with HTTP. You can secure your site by using an HTTPS proxy server such as Fastly.
Is there any way Netlify could help me with this?
Rather than having to rely on a complex system of proxies or serving resources through HTTP, I would stick with my current solution, but I really would prefer to implement Storj.
Any suggestion would be extremely helpful. Please bear in mind that unfortunately I am not a developer, and I could not, for instance, develop a plugin to carry out this task.
Thanks a lot, @hrishikesh, this is awesome and super useful! Can I ask you where should I write the redirect rule in?
Furthermore, is there a way I can redirect any resource URL to the root of my domain, regardless of the subdirectory they originally were in?
e.g. I would like to have http://assets.tommi.space/images/example1.jpg and http://assets.tommi.space/videos/example2.mov respectively available as https://tommi.space/example1.jpg and https://tommi.space/example2.mov
To cache files, the appropriate cache control headers need to be sent by the destination server. We respect those headers and cache accordingly. If you cannot control the caching headers on the destination server, there’s not a lot you can do.