Lumen help
Important: This guide is for the V2 version of Media portal only. If you’re using V3, please refer to Configuration Management for V3, and if you are on V1.5, please note that this version has now been deprecated and we invite you to read our guide on migrating to V3.
Match rules provide the criteria for evaluating requests and responses and, when matched, specify one or more actions (e.g., setting cache expiration, calling geo definitions, content/header processing modes, etc.) for the system to take. Once a match rule criteria is matched, the system stops checking. In other words, the first match wins.
Adding a Match Rule to a Configuration
To add a match rule to a configuration, sign into Media Portal, open the Caching page by navigating to My Services > Caching, and select the access group, Service Component ID (SCID) and the configuration you want to work with, then click on “Edit Configuration”.
From the “Properties” list, select the property to which you wish to add a match rule. Media Portal will display the details for the property.
Click “Add Match Rule” and In the “Match Rule Criteria” field, type the path you want the CDN to look for when evaluating incoming requests.
Note: Please note that at this time, the only supported expression is the requested path/received URI without query strings. Note that the path may be expressed using the following operators:
== Equality test
%= Equality test (case insensitive)
*= Glob test
%* Glob test (case insensitive)
Any operator may be inverted by prepending an “!” (not).
If you want the CDN to look for matches exactly the way you typed the path, select the “Case Sensitive” check box.
From the “Add Setting” list, choose the type of directive you want to use if an incoming request matches the path you typed.
Use the sections below to learn more about how to add each type of directive.
Use the cache-control directive to set the internal and external caching policy. The internal policy tells the CDN how it should cache the object; the external policy instructs the CDN on what information to include in the response sent to the client, influencing how the client caches the received content.
From the “Add Settings” list, select “Cache Control”. By default, Media Portal adds internal cache control—which tells the CDN how it should cache the object. Select the internal policy: TTL, As-is, No-cache, or No-store. If you select TTL, type a number and select a unit for the time to live. If you need to set an external policy, click the “External” checkbox and then select the policy.
Use a deny-policy directive to reject or redirect (to an alternate URL) all requests matching specific criteria.
From the “Add Settings” list, select “Deny Policy”, and fill in the header name and value. To add additional headers, click “Add Header” and repeat. Lastly, Select the type of denial: “Error Message” or “Redirect”. If you select “Redirect”, type the URL where you want to send requests.
Use a geo-blocking directive to allow or deny access based on a requesting client's geographic region. You can also whitelist certain IP addresses within the region(s) to allow their access, but deny all others within the region.
From the “Add Settings” list, select “Geo Blocking”. In the “Available Definitions” section, select one or more definitions you want to apply to this directive, and click the right arrow to move the definitions to the “Added Definitions” section. To remove a definition from the directive, select it in the “Added Definitions” section and click the left arrow. Next, select the radio button for the action you want the CDN to take when the match is made: “Allow” or “Deny”. If you selected “Deny”, select whether you want to display an error or to redirect the request. If you selected “Redirect”, type the destination in the “Redirect URL” field. Lastly, If you need to whitelist IP addresses, select one or more IP-group definitions you want to whitelist in the “Available Definitions” section and click the right arrow to move the definition(s) to the “Added Definitions” section. To remove a definition from the whitelist, select it in the “Added Definitions” section and click the left arrow.
Use an IP-blocking directive to block groups of IP addresses. You can also specify IP addresses to whitelist.
From the “Add Settings” list, select “IP Blocking”. In the “Available Definitions” section, select one or more definitions you want to apply to this directive, and click the right arrow to move the definitions to the “Added Definitions” section. To remove a definition from the directive, select it in the “Added Definitions” section and click the left arrow. Next, select the radio button for the action you want the CDN to take when the match is made: “Allow” or “Deny”. If you selected “Deny”, select whether you want to display an error or to redirect the request. If you selected “Redirect”, type the destination in the “Redirect URL” field.
Use a Lua-scripting directive to define which objects are subject to the Lua script.
From the “Add Settings” list, select “Lua Scripting”. In the “Available Definitions” section, select one or more definitions you want to apply to this directive, and click the right arrow to move the definitions to the “Added Definitions” section. To remove a definition from the directive, select it in the “Added Definitions” section and click the left arrow.
By default, the Lumen CDN includes any query string parameters and they are “honored” in the request URL as part of an object cache key. Set “Query String Handling” to “Ignore” to signify that all query string parameters present in the request URL should be disregarded when looking in the cache for the object.
From the “Add Settings” list, select “Query String Handling” and select how to process query strings - “Honor” or “Ignore”.
Use a request-headers directive to tell the CDN when (and which) custom HTTP request header definition to send upstream to the origin.
From the “Add Settings” list, select “Request Headers”. In the “Available Definitions” section, select one or more definitions you want to apply to this directive, and click the right arrow to move the definitions to the “Added Definitions” section. To remove a definition from the directive, select it in the “Added Definitions” section and click the left arrow.
Use a response-headers directive to tell the CDN when (and which) custom HTTP response header definition to use.
From the “Add Settings” list, select “Response Headers”. In the “Available Definitions” section, select one or more definitions you want to apply to this directive, and click the right arrow to move the definitions to the “Added Definitions” section. To remove a definition from the directive, select it in the “Added Definitions” section and click the left arrow.
Use a secure-fill directive to configure full, end-to-end secure fill of your content. By default, all intra-CDN communication is not secured (over HTTP), regardless of the client protocol and origin fill policy.
From the “Add Settings” list, select “Secure Fill” and select whether to turn secure fill on or off when the path is met.
From the “Add Settings” list, select “Stale Content Control”. If you want the CDN to immediately return a stale response while it revalidates the stale content in the background, click the “stale-while-revalidate” checkbox. When you click the checkbox, the CDN returns cached, but stale, content to the client while revalidating the object in the background for the next request. If you want the CDN to return a stale response when it receives an error (such as a 500 Internal Server Error or DNS failure), click the “stale-if-error” checkbox, then select the checkbox for types of errors you want this to apply for: 4xx errors, 5xx errors, or both.
Use a token-authentication directive to authenticate requests for protected content. You can also set the response the CDN returns to a client whose access is being denied due to the applied token policy—and you can set the response to either an error (403 response) or a redirect to another site (typically used to explain to the user why they are being denied access). You can also specify IP addresses to whitelist (bypassing the token authentication).
From the “Add Settings” list, select “Token Authentication”. In the “Available Definitions” section, select one or more definitions you want to apply to this directive, and click the right arrow to move the definitions to the “Added Definitions” section. To remove a definition from the directive, select it in the “Added Definitions” section and click the left arrow.
Repeat the above steps to add additional match rules. If you need to edit or add other definitions or properties, continue editing the configuration without saving. (Saving the configuration creates a new version.)
When you're done editing the configuration, Click “Save” (above the Service-Wide Definition section). You can also click “Save As” to save the configuration under a new name. If needed, add any notes to describe the changes you made. Click “Save” again and Media Portal will save the configuration.
Learn more about
Media portal
Explore Media portal
Top 10 articles