跳到主要内容

Update Website

Updates an existing website identified by ID.

Request

Request-Line

PUT /waap/v1.0/website/{id} HTTP/1.1

Request Parameters

Body Parameters

ParameterTypeRequiredDescription
originsString[]MandatoryList of origin URLs (1–5). Each must begin with http:// or https://.
http2BooleanOptionalWhether to enable HTTP/2. If not provided, the existing setting will remain unchanged.
redirectHttpToHttpsBooleanOptionalWhether to force HTTP to redirect to HTTPS. If not provided, the existing setting will remain unchanged.
headersObjectMandatoryConfigure the HTTP header to add or replace the headers in requests before forwarding to servers.

Response

Status Codes, Error Codes and Error Messages

Status CodeError CodeError Message
400Request.BadRequestBad request.
400Origins.InvalidOrigins is empty or invalid.
400Id.InvalidId is empty or invalid.
400Headers.InvalidHeaders is empty or invalid.
404Website.NotFoundWebsite is not found.

Examples

Update Website

Request

PUT /waap/v1.0/website/110 HTTP/1.1

{
"origins": ["https://192.168.0.1", "https://origin2.example.com"],
"http2": true,
"redirectHttpToHttps": true,
"headers":{"Host":"$http_host","test1":"111"}
}