The http-control file direction command controls the sizes of HTTP files to be uploaded or downloaded.
The undo http-control file direction command cancels the control over the sizes of HTTP files to be uploaded or downloaded.
http-control file direction { upload | download } { alert-size alert-size | block-size block-size } *
undo http-control file direction { upload | download } { alert-size | block-size } *
| Parameter | Description | Value |
|---|---|---|
| upload | Indicates file upload. | - |
| download | Indicates file download. | - |
| alert-size alert-size | Specifies the alert threshold. If the size of the uploaded or downloaded file reaches the alert threshold, the system generates a log. | The value is an integer ranging from 1 to 1024000, in KB. |
| block-size block-size | Specifies the block threshold. If the size of the uploaded or downloaded file reaches the block threshold, the system blocks the file and generates a log. | The value is an integer ranging from 1 to 1024000, in KB. |
The size of uploaded or downloaded HTTP files is not limited by default.
Configure the alert threshold and block threshold only when the system permits HTTP file upload or download. You can configure the alert threshold, the block threshold, or both. If you configure both the alert threshold and block threshold, the alert threshold cannot be larger than the block threshold.
# Create application behavior control profile hello in the system view and deny the upload of HTTP files larger than 500,000 KB in the profile.
<sysname> system-view [sysname] profile type app-control name hello [sysname-profile-app-control-hello] http-control file direction upload block-size 500000