百度智能云

All Product Document

          CDN

          EdgeJS Configuration Steps

          Overview

          The EdgeJS service supports to execute the JavaScript codes you write by yourself at the edge server, providing you with programmable customized edge configuration capabilities and helping you customize your business rapidly.

          Service Configuration Process

          cdn-111_96c6010.png

          Service subscription

          Currently, the EdgeJS service is in a phase of free trial, you can activate on CDN console.

          1. Log into the CDN Management Console and enter the “Content Delivery Network (CDN) " page.
          2. Click EdgeJS Edge Service in the left navigation bar.
          3. Click Enable EdgeJS Service.

          Create tasks

          1. Log into the CDN Management Console and enter the “Content Delivery Network (CDN) " page.
          2. Click EdgeJS Edge Service in the left navigation bar.
          3. Enter the “EdgeJS Edge Service " page, click Create an EdgeJS task, and enter the page to create a task.

          image.png

          Select domain name

          1. After entering the page of creating new tasks, enter Task Name.
          2. Since the EdgeJS rules take effect depending on domain name, please configure the domain name of EdgeJS rule as required.

          image.png

          Fill the code of the rule

          Fill in the rule code in the code box, as shown below.

          image.png

          The codes in the Figure are detailed as follows:

          image.png

          For detailed coding requirements, please see Configuration Methods for EdgeJS Rule.

          Clicking clean will remove the codes in the code box, and you are recommended to save the edited contents before operation.

          Debug and commissioning

          After writing the code, click debug to trigger debugging, and the result shows in the “Debug Result” box on the right; if there is no problem, the box shows “Pass the Debugging”.

          Pre-release

          After debugging, click the pre-release button below to trigger the pre-release process. A prompt message will be generated on the current page after successful publication. Please select whole network release/cancel release after pre-release as soon as possible, or the other configurations may cover the current pre-release settings.

          Release on the network

          Click whole network release to trigger whole network release procedures. Pre-release is recommended, and then release in the whole network after confirmation.

          Cancel to release

          After the pre-release or release on the whole network, if the rule no longer applies to your needs, you can cancel/delete your release.

          Operation log

          1. Log into the CDN Management Console and enter the “Content Delivery Network (CDN) " page.
          2. Click EdgeJS Task Management on the Navbar to the left.
          3. Enter the page of "EdgeJS Task Management", and click Operation Log.
          4. The “Operation log record page " pops up on the left of the page, select the Time Period you want to view, and the page displays the corresponding EdgeJS task operation records.

          image.png

          Previous
          Configure Domain Name
          Next
          EJS Rule Configuration Method