Serverless Scripting Example: Add Headers to a Response
Overview
You can use this document to learn how to add additional headers to your request, such as additional cookies.
Before you begin, you must enable serverless scripting for your stack. To learn more, see Enable Serverless Scripting and Creat...
Read More »
Serverless Scripting Example: IP Firewall
Overview
You can use this document to learn how to implement an IP firewall rule.
Before you begin, you must enable serverless scripting for your stack. To learn more, see Enable Serverless Scripting and Create a Script.
View a sample script
In ...
Read More »
Serverless Scripting Example: Request Headers
Overview
You can use this document to learn how to use request headers with serverless scripting.
View a sample request header
You can use request headers in any script with serverless scripting with the following script:
request.headers.get(...
Read More »
Serverless Scripting Example: Response Body Modification
Overview
You can use this document to learn how to modify the request's response body before the response reaches the user's browsers. Specifically, this document displays how to change the background of the response to #000000 by using regex to f...
Read More »
Serverless Scripting Example: Robots.txt response
Overview
You can use this document to learn how you can return a static response from serverless scripts. Specifically, this document will use robots.txt as an example.
Before you begin, you must enable serverless scripting for your stack. To lea...
Read More »
Serverless Scripting Example: Send Logs to Logging Services
Overview
You can use this document to learn how to send logs to third-party logging services. Specifically, this document provides examples for a self-hosted ElasticSearch cluster and the LogDNA SaaS.
Before you begin, you must enable serverless ...
Read More »
Serverless Scripting Example: Single and Multiple Origin Routing
Overview
You can use this document to learn how to create a script that can:
Re-route a single URL path to a single, alternate origin
Re-route multiple URL paths to multiple origins
Before you begin, you must enable serverless scripting for you...
Read More »
Serverless Scripting Example: Static Response
Overview
You can use this document to learn how to send a static response.
Before you begin, you must enable serverless scripting for your stack. To learn more, see Enable Serverless Scripting and Create a Script.
View a sample script
In the f...
Read More »
Serverless Scripting Example: wp-login.php Protection
Overview
You can use this document to learn how to protect wp-login.php from unwanted IP addresses.
Based on the script's configurations, this process will deny access to wp-login.php to specified IP addresses. For example, if you have a blog with...
Read More »
95% of questions can be answered using the search tool. This is the quickest way to get a response.