Please could you support proxy setting on SWA CLI like function core tools setting?
Troubleshooting
We experienced the following error message even put exact staticwebapp.config.json location.
[swa] WARNING: Failed to load staticwebapp.config.json schema. Continuing without validation!
We investigated the warning that is output when the swa start command is executed in the customer's environment is described on line 108 of the source code below. In addition, when we checked the conditions under which the warning is output, we found that the warning is output when the value is null in the variable schema, which stores the execution result of the loadSWAConfigSchemema method.
https://github.com/Azure/static-web-apps-cli/blob/a036c97570bed24bfc3d10de39f075fd0822b353/src/core/utils/user-config.ts#L108
We were concerned that the loadSWAConfigSchemema method was not acquiring values, so we subsequently checked the processing of the loadSWAConfigSchemema method. According to the processing performed in the source code below, the loadSWAConfigSchemema method attempts to obtain configuration information from the endpoint "" https://json.schemastore.org/staticwebapp.config.json" and converts it to json format if it is obtained. If not, it returns null. When the swa start command was executed in the customer's environment, null was returned in the loadSWAConfigSchemema method, so it is possible that communication to the endpoint was not established.
We checked how to use their network environment on his local PC. So we checked to use curl command that connect the target url or not. The following results, they are using Proxy on their environment.
local PC ---> Proxy (Zscaler) ---> network ---> staticwebapp.config.json
Requests
Please could you support proxy setting on SWA CLI like function core tools setting?
Troubleshooting
We experienced the following error message even put exact staticwebapp.config.json location.
We investigated the warning that is output when the swa start command is executed in the customer's environment is described on line 108 of the source code below. In addition, when we checked the conditions under which the warning is output, we found that the warning is output when the value is null in the variable schema, which stores the execution result of the loadSWAConfigSchemema method. https://github.com/Azure/static-web-apps-cli/blob/a036c97570bed24bfc3d10de39f075fd0822b353/src/core/utils/user-config.ts#L108![image](https://user-images.githubusercontent.com/24888431/229677298-8c60f3e3-26ad-40a9-aac7-49692bbd07b1.png)
We were concerned that the loadSWAConfigSchemema method was not acquiring values, so we subsequently checked the processing of the loadSWAConfigSchemema method. According to the processing performed in the source code below, the loadSWAConfigSchemema method attempts to obtain configuration information from the endpoint "" https://json.schemastore.org/staticwebapp.config.json" and converts it to json format if it is obtained. If not, it returns null. When the swa start command was executed in the customer's environment, null was returned in the loadSWAConfigSchemema method, so it is possible that communication to the endpoint was not established.
https://github.com/Azure/static-web-apps-cli/blob/a036c97570bed24bfc3d10de39f075fd0822b353/src/core/utils/user-config.ts#L167![image](https://user-images.githubusercontent.com/24888431/229677655-17047562-c4ec-44cd-af21-6f53258a0711.png)
We checked how to use their network environment on his local PC. So we checked to use curl command that connect the target url or not. The following results, they are using Proxy on their environment.
local PC ---> Proxy (Zscaler) ---> network ---> staticwebapp.config.json