All Products
Search
Document Center

After CDN and OSS are deployed, static files are force downloaded.

Last Updated: Mar 30, 2020

Problem Description

After CDN and OSS are used, the access URL is a direct download.

 

Cause of problem

OSS uses the default policy to add the attachment attribute to objects when the system accesses three levels of domains. As a result, the object is a forced download.

 

Solution

You need to modify the CDN origin HOST and configure it as the CDN domain instead of the Bucket domain. (that is, it is not the domain name ending with aliyuncs.com. This domain name is the default domain name of OSS.) perform the following steps.

  1. Login CDN console.
  2. In the left-side navigation pane, choose domain name management.
  3. Click management > origin fetch configuration.
  4. Click SOURCE HOST on the right modify a configuration.
  5. Domain type selection domain name, click confirm OK.

 

Applicable to

  • CDN