Preview OSS files in Designer

更新时间:
复制 MD 格式

To preview CSV and JSON files from OSS in the Designer visual modeling platform, you must enable cross-origin resource sharing (CORS) for the OSS bucket that contains the files. This topic describes how to configure CORS.

Prerequisites

You must have management permissions for the target OSS bucket. For more information, see Cloud product dependencies and authorization: Designer.

Procedure

  1. Go to the details page of a bucket.

    1. Log on to the OSS console.

    2. In the left-side navigation pane, click Buckets.

    3. On the Buckets page, find the OSS bucket that you want to manage and click the bucket name.

  2. On the bucket details page, click Content Security > CORS.

  3. On the CORS page, click Create Rule. In the Create Rule panel, configure the following parameters.

    Parameter

    Required

    Description

    Source

    Yes

    Specify the origins that are allowed to send cross-origin requests. Set this parameter to the following values:

    https://*.console.aliyun.com
    http://*.console.aliyun.com

    Allowed Methods

    Yes

    Specify the HTTP methods allowed for cross-origin requests. Set this parameter to the following values:

    PUT
    GET
    POST
    HEAD

    Allowed Headers

    Yes

    Specify the request headers allowed in a cross-origin request. Set this parameter to the following values:

    authorization
    content-md5
    content-type
    x-oss-date
    x-oss-security-token
    x-oss-user-agent
    range

    Exposed Headers

    Yes

    Specify the response headers that your application can access. Set this parameter to the following values:

    etag
    x-oss-request-id

    Cache Timeout

    No

    Specify the cache duration in seconds for the results of a preflight (OPTIONS) request.

    Vary: Origin

    No

    Specify whether to include the Vary: Origin header in the response.

    If you expect both CORS and non-CORS requests, or if the Origin header can have multiple values, select Vary: Origin to prevent caching issues in the browser.

    Important

    Selecting Vary: Origin may increase browser requests or CDN back-to-origin requests.

  4. Click OK.