How to create rules to automate behaviors with Rules Engine

Implementing rules in your application using Rules Engine will allow you to determine the tasks it should execute in specific scenarios without modifying your application’s code.

This guide demonstrates the process of creating rules with a practical example, but most rules will be unique to each application and its needs. In addition to activating variables such as device groups, cache settings, and origins, you can create a wide variety of rules in both the request and response phases.

With this guide, you’ll create a rule in the response phase to remove an HTTP header using the Filter Response Header behavior.


To activate the Application Accelerator module:

  1. Access Azion Console > Edge Application.
  2. Click the edge application you want to configure.
  3. Activate the Application Accelerator module.
  4. Click the Save button.

The Server header stores information about the server that generated the response. By removing this header, end-users won’t receive information about the infrastructure of your application, enhancing your security by reducing the information available to potential attackers.

To remove the Server header:

  1. Navigate to the Rules Engine tab.
  2. Click the + Rule button.
  3. Give your rule a name and, if necessary, a description.
  4. Select Response Phase.
  5. In the Criteria section, select the ${uri} variable.
  6. As a comparison operator, select starts with.
  7. As an argument, add the value /.
  8. In the Behaviors section, select Filter Response Header.
  9. As an argument, add Server.
  10. Click the Save button.

Contributors