Serving files via 2 domains / SSL-Proxy

How do I serve files from 2 different domain aliases?

The specific usecase is me using a SSL-Proxy from my hoster to serve certain files via HTTPS connection – to prevent cross-origin errors on external sites.

Is there a way to configure a second, „safe“ domain which doesn’t rewrite file links to the original „unsafe“ domain?

Detailed info:

Serving single pages like
https://ssl-proxy.cdn/mysite.com/about
instead of
http://mysite.com/about

works, but pointing to files like

https://ssl-proxy.cdn/mysite.com/about/image.jpg
doesn’t, whereas the original filepath
https://ssl-proxy.cdn/mysite.com/content/1-about/image.jpg

indeed displays the image via HTTPS.

URLs like /about/image.jpg aren’t supposed to work anyway, you need to have /content in the path.

Mhh, I recall a blog post that had some infos on this – can’t find it though.

It’s obviously foreseen though – you’re right insofar as the request gets redirected to the actual file, including content/1-about path and everything, but you can create external src links in the aforementioned way.

You are probably referring to the asset firewall.

Yes, that’s right. Kirby redirects these virtual file URLs to the actual file (so that the web server can handle the file, PHP can’t process very large files because of the max execution time). But why do you want to use these virtual URLs? That’s another roundtrip for nothing.

You’re right, I was simply used to the shorter URL and thought I was doing something wrong.

The article was an older one, something about Kirby 2 features; but nevermind – marking this as solved for now!