Mobile app version of vmapp.org
Login or Join
Michele947

: How to pass requested domain to server when behind MaxCDN? I have a bit of a problem getting our server to know what domain was requested to get to the server. The scenario is like this.

@Michele947

Posted in: #Apache2 #Cdn #Domains #HttpHeaders #ServerSideScripting

I have a bit of a problem getting our server to know what domain was requested to get to the server.

The scenario is like this.

site1.tld, site2.tld, site3.tld and site4.tld are all pointing to the CDN. The CDN is set up to pull data from one server. Let's name it origin.tld.

Now the problem comes when a customer types site1.tld. That's what they see, which is a good thing. But on the server side, it sees the request as origin.tld because that's what the CDN requested from it.

I do not see headers that are passed by the CDN like X-FORWARDED-FOR where we can still capture origin information.

Basically, I will need the server to catch which domain the user actually requested from the server side without using Javascript and sending cookies to the server containing requested URL.

Is this possible or am I delusional on trying to get this info "server-side?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Michele947

1 Comments

Sorted by latest first Latest Oldest Best

 

@Megan663

What you see is obviously technically possible however to know what MaxCDN provides you exactly did you ask them?
I really doubt however that it works like you said, even if I have no direct proof of it, because that would affect a lot of customers.
If it does, your easy solution is to configure site1.tld to catch from site1.origin.tld, site2.tld from site2.origin.tld, etc... or any other equivalent scheme as you obviously have full control over your origin.tld and the configuration you are giving to your CDN provider.

BTW, you are not helping people helping you as you do not provide the true names involved.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme