Background: Recently encountered new requirements in the development of the company's OA system to migrate a set of small programs to go
Some feature information is viewed in applet but the file is uploaded on the PC side
For example: Leaders in the office to use the applet to view the Xxxx.pdf file this time encountered problems,
The deployment of the PC side and the deployment of the applet are not on the same server.
Upload files on PC side want applet to see the heart immediately have a program directly access to the PC-side file address Open file is OK,
But everything is not taken for granted ... The applet only supports opening https:xxxxx.com URLs, which means that the PC's URL must be in support of the HTTPS protocol.
However, the web address of the PC can not be changed to support the HTTPS protocol, then the second method is directly on the PC side of the server to upload the disk, note: (I use the Layui upload module front-end directly apply on OK)
It's like this when you finish the test. Hint NO access-control-allow-origin
Decisive Baidu a wave of discovery cross-site requests need to be configured in the IIS Server Access-control-allow-origin tutorial (51496134)
Detailed Introduction (78082585)
Open the IIS Server
Find HTTP response header Open
Add the following two strips
Access-control-allow-headers:content-type, Api_key, Authorization.
Access-control-allow-origin:*.
Restart the server test upload success!
Then the joy of a batch after looking at this * number is worried about Baidu a wave
Use wildcards * to allow all cross-domain access
Then change the * to send the requested domain name over!
Continue to the code .....
Also why the Insert Connection button is gray ....
Cross-domain access issues under IIS set--access-control-allow-origin site requests across domains