How can Didi cube-ui upload components not send options requests?

// vue
<cube-upload
    ref="upload"
    :action="action"
    :simultaneous-uploads="1"
    :process-file="processFile"
    @file-submitted="fileSubmitted" />
          // js
          action: {
            target: `${APIPREFIX}/api/common/upload?appId=${APPID}&appSecret=${APPSECRET}`,
            prop: "base64Value",
            headers: {
              "Content-Type": "multipart/form-data"
            }
          }
Mar.11,2021

sending an options request is the behavior of the browser. If it is a cross-domain POST request, the browser will automatically send the options request.

two choices:
1. Put the request under the same domain
2. The requested address setting allows cross-domain

Menu