allow_post
Version: v2025-02-18 | Includes use: Yes |
---|
Behavior name: Allow POST
Allow HTTP requests using the POST
method. By default, GET
, HEAD
, and OPTIONS
requests are allowed, and POST
requests are denied with 403
error. All other methods result in a 501
error. See also the allow_delete
, allow_options
, allow_patch
, and allow_put
behaviors.
Default behavior
These samples reflect the behavior's default settings. You can use these as is in your configurations or make adjustments based on the behavior's available options.
data "akamai_property_rules_builder" "allow_post" {
rules_v2025_02_18 {
name = "Allow POST"
comments = "Allow HTTP requests using the POST method."
behavior {
allow_post {
enabled = true
allow_without_content_length = false
}
}
}
}
"behaviors": [
{
"name": "allowPost",
"options": {
"enabled": true,
"allowWithoutContentLength": false
}
}
]
Options
Option | Description |
---|---|
enabled |
Allows
POST requests.
|
allow_without_content_length |
By default,
POST requests also require a Content-Length header, or they result in a 411 error. With this option enabled with no specified Content-Length the edge server relies on a Transfer-Encoding header to chunk the data. If neither header is present, it assumes the request has no body, and it adds a header with a 0 value to the forward request.
|
Updated 10 days ago