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.
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.
- Login CDN console.
- In the left-side navigation pane, choose domain name management.
- Click management > origin fetch configuration.
- Click SOURCE HOST on the right modify a configuration.
- Domain type selection domain name, click confirm OK.