Updated on 2024-07-11 GMT+08:00

Implementation Procedure

Prerequisites

  • You have created an API whose frontend request protocol is set to HTTPS or HTTP&HTTPS.
  • The API has been published.
  • An independent domain name and SSL certificate have been bound to the API group to which the API belongs.

For details about these operations, see the APIG User Guide

Enabling Redirection

  1. Log in to the APIG console, and choose API Management > API Groups.
  2. Click a group name to go to the details page.
  3. On the Group Information tab, locate the bound independent domain name, and enable HTTP-to-HTTPS Auto Redirection.

Verifying Redirection

  1. Use a browser to call the API through HTTPS.

    1. In the address bar of the browser, enter https://API request path, and press Enter.
    2. Press F12.
    3. Check the status code displayed on the Network tab. 200 means the calling is successful.

  2. Use a browser to call the API through HTTP.

    1. In the address bar of the browser, enter http://API request path, and press Enter.
    2. Press F12.
    3. Check the status code displayed on the Network tab. 301 means the redirection is successful.