"invisible" proxying

I have a domain (let’s call it xyz.domain) and an externally hosted website (which is precisely https://vivien158.wixsite.com/vivspots).

I could set up Wix to serve that from xyz.domain; but I’d rather have it served from xyz.domain/vivspots (because I’d like the option of having other things in that domain) - which I can’t do with Wix. So I tried setting up a proxy.

What I’ve tried is very basic:

xyz.domain {
    	proxy /vivspots https://vivien158.wixsite.com/vivspots {
    		transparent
    	} 
}

but whether I include transparent or not, Wix responds by saying it doesn’t know about xyz.domain, so presumably the request headers tells it the original requested server name. What I’d like is for Wix to see the proxy request as a simple client request (which Caddy can then relay), which I suppose would require Caddy to rewrite the request header (and any others perhaps?) to change the server name. Is this possible, or am I asking for something which is out of the scope of the proxy function?

Paul

A transparent reverse proxy carries the original request hostname through to the upstream. Did you try without transparent?

Yes I did, and the effect was the same without transparent.

I have found a different solution for my immediate problem (using redir and an extra subdomain which allows the response from Wix to be set up to display a subdomain of xyz.domain); but it’s not a general solution, and so I’m still interested if someone has an answer to the question as posed.

Looks like Wix offer the use of custom domains as a feature of their premium plans, and without configuring their service for xyz.domain, any attempt to whitelabel the site is going to have some drawbacks.

If removing transparent didn’t work, I’m not sure if this will, but you could check whether adding header_upstream Host vivien158.wixsite.com has any effect.

FYI, a transparent proxy even retains the source IP (sets it to the originator’s IP, not ::1or the like).

Well, a systemd-transparent-udp-forwarderd transparent UDP proxy spoofs the originating IP, which a Caddy transparent HTTP proxy doesn’t do.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.