Origin-pull follows 301amp 302 configuration

Last updated: 2020-02-14 15:57:14

PDF

CDN provides you with the configuration function of Origin-pull following 301Compact 302. When the node Origin-pull request returns the 301amp 302 status code, the CDN node will request resources directly from Redirect's address instead of returning 301amp 302 to the user.

Configuration guide

  1. Login CDN console Click * * Domain name Management * * on the left side of Directory to go to the management page, find the row of the domain name you want to edit in the list, and click * * manage * * in the operation bar.
  1. Click [Origin-pull configuration], and you can see ** "Origin-pull follows 301amp 302 configuration" ** Module, which is off by default.

Configuration case

  • The domain name is www.test.com Origin-pull follows 301Compact 302 and is configured as follows:

User A requests resources: http://www.test.com/1.jpg If the node misses the cache, the node will request real server to obtain the required resources. If the HTTP Response status code returned by the origin server is 301Universe 302, Redirect points to the address as http://www.abc.com/1.jpg , then:

  1. The node returns the HTTP Response directly to the user.
  2. User to http://www.abc.com/1.jpg Initiate a request. If the domain name is not connected to CDN, there will be no acceleration effect.
  3. If user B also reports to http://www.test.com/1.jpg If a request is initiated, the above process will be repeated.
  • The domain name is www.test.com Origin-pull follows 301Compact 302 and is configured as follows:

User A requests resources: http://www.test.com/1.jpg If the node misses the cache, the node will request real server to obtain the required resources. If the HTTP Response status code returned by the origin server is 302, Redirect points to the address as http://www.abc.com/1.jpg , then:

  1. After enabling the configuration of Origin-pull following 301Compact 302, the node will initiate a request to the address pointed to by Redirect directly when it receives the HTTP Response with the status code 301Universe 302.
  2. After the required resources are obtained, they are cached to the node and returned to the user.
  3. At this point, user B also reports to http://www.test.com/1.jpg If the request is initiated, it will be directly hit at the node and returned to the user.
  4. After enabling the configuration of Origin-pull following 301Compact 302, you can only follow Redirect for a maximum of 3 times. If you exceed the limit, you will directly return 301Universe 302 to the customer.