IIS deploys WebGL to call the iLab platform interface cross-domain problem

1 Introduction

① For how to deploy WebGL in IIS, please refer to another article: https://editor.csdn.net/md/?articleId=131563136
② School experiments need to be connected to the iLab platform of the experiment space, and their interfaces need to be called, such as: http:// www.ilab-x.com/open/api/v2/user/validate?

2. Questions

After the experiment is packaged and deployed to IIS, it starts to report cross-domain:
insert image description here

3. Reason

I consulted the technicians in the experimental space by phone, and told them that there would be cross-domain access to their interfaces directly in the browser, for security reasons.

4. Solutions

Install ARR3.0 and rewrite_url
Download address: https://www.iis.net/downloads/microsoft/application-request-routing
① Install ARR 3.0 (Application Request Routing)
② Install rewrite_url
③ Restart the IIS server after installation
④ Open proxy
Click on Server -> Double click on Application-Request-Routing
insert image description here

Click "Server Proxy Settings"
insert image description here
insert image description here

⑤ Configure forwarding
Double-click URL rewrite
insert image description here
Click "Add Rule"
insert image description here
Click "Blank Rule" - "OK"
insert image description here
Configure rewrite
Use: wildcard
Mode: *open/*
Rewrite URL: http://www.ilab-x.com/open /{R:2}
insert image description here

Guess you like

Origin blog.csdn.net/Gpointy/article/details/131857986