Skip to main content

Security Domain

When you need to use CloudBase's authentication service in a web application, you must add your website's domain name (the domain name of the page initiating the request) to the secure domain list. Secure domains are the source domains of user requests recognized by the CloudBase service, and all requests originating from domains not on the secure domain list will not be responded to.

Viewing Security Domain

Use the following command to view all configured secure domains.

tcb env domain list

Adding Security Domains

You can use the following command to add new secure domains:

tcb env domain create <domian>

You need to specify the domain to be added. When adding multiple domains, separate them with /, such as abc.com/def.com.

# Adding a Domain
tcb env domain create www.xxx.com

# Adding Multiple Domains
tcb env domain create www.domain1.com/www.domain2.com/www.domain3.com

Deleting Security Domain

You can use the following command to delete secure domains:

tcb env domain delete

After pressing Enter, CloudBase CLI will fetch all the secure domains you have configured, and you can choose to delete specific domains.