Step 1: Verify Cloud Function Configuration
If your web service has enabled Tencent Cloud Serverless Cloud Function (SCF), you can configure domain protection in the Cloud Function WAF instance. Please log in to the Serverless Console, and in the left navigation bar, select Function Service to verify whether Cloud Function is in use. Step 2: Add Domain and Bind to Cloud Function
1. Log in to the WAF console and select Connection Mangement > Domain Onboarding on the left sidebar. 2. On the domain onboarding page, click Add domain, configure relevant parameters, and click OK.
Field description
Associated instance: Select the CLB type and an instance name.
Domain name: Enter the domain name to be protected, such as test.com.
Traffic source: Select Cloud Function.
Use proxy: Select whether proxy services including Anti-DDoS and CDN are used based on the actual conditions.
Note:
If you select Yes, WAF will get real client IPs, which may be forged, from the XFF field as the source IPs.
Outside China: Select based on the location of the cloud function service.
Remarks: Enter your remark.
3. Click OK to verify that the protected domain has been successfully added.
Step 3: Verification Test
In the browser, enter the URL http://<Gateway Domain or IP>/?test=alert(123)and access it. If the browser returns a blocked page, it indicates that the Web Application Firewall protection function is working properly.