OpenResty Edge Configuration Examples Based on YAML Files

Examples of OpenResty Edge configuration based on YAML files.

Global Configuration

The globalconfigs.yaml file must be located in the root of your configuration directory and must be named globalconfigs.yaml.

Global Basic Authentication Groups

The Yaml files can contain one or more global basic authentication groups.

Global IP Lists

The YAML files can contain one or more global IP lists. This configuration defines two global IP lists, each containing multiple IPv4 addresses.

Global Upstreams

The YAML files can contain one or more global upstream configurations.

Global Kubernetes Upstreams

The YAML files can contain one or more global Kubernetes upstream configurations.

Global Page Templates

The YAML files can contain one or more global page templates.

Global Static Files

The globalstaticfiles.yaml file contains configuration information for global static files and directories, while the actual file contents are stored.

Global Custom Actions

The YAML files can contain one or more global custom actions.

Global Lua Modules

Global Lua modules are a powerful mechanism for implementing complex logical functionalities.

HTTP Applications

In older versions of the edge2yaml command-line tool, when creating an application, the access log format required by the application was.

Application Basic Authentication Groups

Each YAML file contains the configuration for one or more basic authentication groups for the application.

Application Upstreams

The YAML files can contain one or more upstream configurations of the applications.

Application Kubernetes Upstreams

The YAML files can contain one or more application Kubernetes upstream configurations.

Application IP Lists

The YAML file can contain one or more application IP lists.

Application User Variables

The YAML files can contain one or more user variables of the application.

Application WAF Whitelist

The YAML files can contain one or more application WAF whitelist configurations.

Page Rules

You can define multiple page rules in a single YAML configuration file. Note that content and proxy should not be used in the same page rule.

Page Rules - Conditions

Page rule condition configuration allows the defining of multiple conditions with a logical ‘AND’ relationship.

Page Rule Actions

limitkey options: client-addr: Client address uri: Requested URI uri-arg: Request parameters req-cookie: Cookies in the request req-header: Request.

Web Application Firewall (WAF)

The Web Application Firewall (WAF) is designed to protect web applications from various network attacks, such as Cross-Site Scripting (XSS), SQL.

Page Rules - Proxy

The proxy section in OpenResty Edge’s page rules configures request proxy behavior.

Caching

This document describes how to cache static resources or content with fewer changes by enabling caching options within page rules.

Page Rules - Content

This document describes using static files by enabling the ‘Content’ option in page rules.

Kubernetes Clusters

Each yaml file can contain one or more Kubernetes clusters.

Sending Emails

This document describes how to configure the sender information for sending emails.

User Management

Starting from version 1.2.55 of the command-line tool, we have added support for user management.