How To Connect Directly To Your Origin Web Server Bypass Intermediary Proxies To View Original Http Headers

My website dev2qa.com uses two CDN proxies as a chain to cache my web pages. One is Cloudflare which sits in front of my website dev2qa.com, the other is Ezoic Caching which sits in front of Cloudflare CDN. But someday, I find there are a lot of unuseful response headers in the HTTP response, and I want to clarify which response header is added by intermediary proxy and which response header is added by the original web server. So I need to connect to the dev2qa.com webserver directly to bypass intermediary proxies. This article will tell you how to do it.

1. View HTTP Headers Added By CDN Proxies.

  1. First, let us view the HTTP response headers when we connect to dev2qa.com through Cloudflare and Ezoic CDN proxies.
  2. I use Internet Explorer to inspect the HTTP response headers, if you want to use google chrome or Mozilla Firefox, please read the article How To View HTTP Headers, Cookies In Google Chrome, Firefox, Internet Explorer.
  3. In IE inspector, we can see below HTTP response headers.
  4. cf-ray: This is added by Cloudflare.
  5. server : cloudflare: Added by Cloudflare also.
  6. x-ezoic-cdn : Hit: This header is added by Ezoic CDN.
  7. vary: This HTTP header value can be set both at the original web server, Cloudflare, or Ezoic side. The value may be combined with three parts. So our goal is to distinguish which Vary header value is added at the original web server, and which value is added at the intermediary proxy.

2. Connect To Original Web Server Directly To View HTTP Headers Added By Original Web Server.

  1. Get your original web server static IP address.
  2. Edit hosts file in your OS to add IP domain mappings ( for example 1.2.8.9 www.dev2qa.com ) in it. Please read the article How To Edit Hosts File In Windows 10, How To Edit Hosts File In Mac OS And Linux. After that when you input domain www.dev2qa.com in the web browser, the domain will be resolved to the original web server IP directly, so the communication will be passed through the original web server than CDN proxies.
  3. Now browse the below url in IE and use the network inspector to view the HTTP response headers, you can see the below headers ( especially the Vary header ) added by the original web server. Vary : Accept-Encoding, Cookie. So the Vary header’s value ‘Cookie‘ is added at the original web server side.

3. Why Not Found String ‘Cookie’ When View Vary Header Through Intermediary Proxy?

  1. You may wonder why the string ‘Cookie‘ disappears when you view the Vary header through the intermediary proxy?
  2. This is because Ezoic provides a function in it’s Caching app settings, that function can let you remove any Vary header values from the upper original or proxy server.
  3. First, you should register as an Ezoic publisher, then login to the Ezoic dashboard, and click Caching App —> Update Cache Setting Values button, then you can enter Cookie in Vary Headers to be removed from origin input text box. Click the save button and go back, you may wait some time for the settings to take effect.
0 0 votes
Article Rating
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x