Help Center> Object Storage Service> FAQs> Buckets and Objects> With CDN Acceleration Enabled, Why Is My .html Static Website File Directly Downloaded When I Access It?

With CDN Acceleration Enabled, Why Is My .html Static Website File Directly Downloaded When I Access It?

Symptoms

After CDN acceleration is enabled for a user-defined domain name on OBS Console or the origin server address for an acceleration domain name added through the CDN console is set to an OBS bucket domain name, the .html static website file stored in OBS is directly downloaded when it is accessed.

Solutions

You can use the following two methods to fix this issue:

Method 1

Log in to the CDN console and go to the Domains pages. On the Domains page, click the target domain name and click the Advanced Settings tab. Then, add the Content-Disposition response header and set its value to inline.

If the issue persists after the preceding configuration is complete, refresh the cache on the CDN console. For details, see Cache Refreshing.

Solution 2

Log in to the CDN console and go to the Domains pages. On the Domains page, click the target domain name, click the Basic Settings tab, and click Edit next to Origin Server Settings. In the displayed dialog box, change the value of Type from OBS bucket to Domain name, and configure Origin to the user-defined domain name of the OBS bucket.

If the issue persists after the preceding configuration is complete, refresh the cache on the CDN console. For details, see Cache Refreshing.