Cross-origin configuration
Cross-origin requests

If you use an HTTP-triggered cloud function on your website, your browser may display a cross-origin error. This occurs if you have not configured the required rules in the EMAS Serverless console. The error is similar to the one shown in the following figure:
Add an allowed origin
Open the cloud function console. On the Cross-origin configuration page, click Add Domain Name in the upper-right corner.
The domain name rules are as follows:
1. You can specify a domain name, such as www.example.com.
2. A specific port number, such as www.example.com:8080
3. A wildcard prefix for the domain name, such as *.example.com
4. A wildcard for the port number, such as www.example.com:*
5. A wildcard for both the domain name prefix and the port, such as *.example.com:*
6. Support*
It takes about one minute for the configuration to take effect.
You can add a maximum of 10 rules for each service space.
Do not include the HTTP or HTTPS prefix in the domain name. The server-side supports both protocols by default.