Proxy via MaxCDN EdgeRules

29 October 2015 by admin

This guide is loosely based on this guide from MaxCDN. We will use it to set up two rules which together form the Yavli Proxy implementation.

  1. Login to your account.
  2. Click Zones in the main navigation bar.
  3. Click View Pull Zones.
  4. Select the pull zone you wish to create the rule on, and click Manage.
  5. Click the tab EdgeRules.
  6. Click Create Rule to set up the following two rules:

Rule #1

Match Criteria

Match Type: Regular Expression

Match Location: ^\/(?!yproxy).*\.(jpg|jpeg|gif|png|bmp|ico)$

Case Sensitive: No – leave unchecked.

Features

Directive: [ERROR PAGE] 404 =200 /yproxy$request_uri

Click Add to save the rule.

Rule #2

Match Criteria

Match Type: Regular Expression

Match Location: /yproxy(.*)$

Case Sensitive: No – leave unchecked.

Features

Directive: [MODIFY REQEUST HEADER] X-Forwarded-For $proxy_add_x_forwarded_for

Directive: [MODIFY REQEUST HEADER] X-Forwarded-Host $host

Directive: [PROXY PASS] http://steg.yavli.com

Click Add to save the rule.


The Yavli proxy should now be operational.