当前位置:网站首页>How to solve the cross domain problem of mobile phone accessing the web in the web development scenario
How to solve the cross domain problem of mobile phone accessing the web in the web development scenario
2022-06-29 07:29:00 【I am a volcano】
1. Host computer setup web service
download tomcat
Official website :https://tomcat.apache.org/download-10.cgi ( The official website is unstable and often can't be downloaded . You can look for resources )
2. Release web service
stay tomcat/webapps/ROOT Place under directory web Program
start-up tomcat Folder bin In the catalog startup.sh
Catalog :/tomcat/bin/startup.sh
3. Verify whether the service is started successfully
Open the computer browser to access 127.0.0.1:8080( The default port is set to 8080), If you can access the home page , It should be that the service is successfully built , However, if the browser is not set to allow cross domain access, access failure may occur .
4. establish chrome-command-line file
Create a file , edit :chromium-browser --disable-web-security --user-data-dir="/data/user/0/com.android.chrome/app_chrome/Default"
5. Import the file into the phone
adopt adb command , Put the above 4 The file created in step is pushed to the mobile phone /data/local/tmp Under the table of contents .adb push route /chrome-command-line /data/local/tmp
6.chrome Browser settings
Browser access chrome://flags, Turn on enable-command-line-on-non-rooted-devices Set up . Manually stop the application from the settings and restart .
Later visit chrome://version, see Command line , See if the command appears :--disable-web-security. If it appears, it means ok 了
边栏推荐
猜你喜欢

1183:病人排队
【翻译】簇拥而出。构建现代应用程序的设计方法

Markdown skill tree (5): picture

Mmclassification installation and debugging

IMX6DL4.1.15支持EIM总线(下)——配置原理分析。

mmclassification安装与调试

Tree drop-down selection box El select combined with El tree effect demo (sorting)

通过keyup监听textarea输入更改按钮样式
What tools do testers need to know

感知健康生活 赋能无界连接 ——为OpenHarmony 3.1生态构建贡献芯海力量
随机推荐
uva10859
施努卡:3d视觉检测方案 3d视觉检测应用行业
测试人员需要了解的工具有哪些
1183: patient queue
施努卡:什么是视觉定位系统 视觉定位系统的工作原理
WordPress adds article topping, password protection, and privacy Tags
Datatables屏蔽报错弹窗
1183:病人排队
Autosar SWC在Simulink中Parameter的使用
shell条件判断详解
帆船动力学仿真分析
The realization of changing pop-up background at any time
[translation] swarmed out. Design methods for building modern applications
Reflection modification final
如何看待软件测试培训?你需要培训吗?
节流的两种写法-最近看到的这种写法
What does VPS do? What are the famous brands? What is the difference with ECS?
关于工作方法和高效工作的建议
YGG pilipinas: typhoon Odette disaster relief work update
Markdown 技能树(5):图片