当前位置:网站首页>Cross domain issues of the new version of Google browser

Cross domain issues of the new version of Google browser

2022-06-23 23:45:00 FHAdmin

The new version of the firefox Firefox limits 127.0.0.1

When deploying tests locally , Using Firefox requires Front-end Change the service address in the background to http://localhost:8081

The browser also uses http://localhost:8080

Clean up the browser cache when finished , Otherwise it will not take effect

In case of server deployment , hold localhost Change to the actual server IP Or domain name

google browser , Front end and back end stay On the same computer

backstage If the service address in is http://localhost:8081

So when the browser accesses, it also uses http://localhost:8080

If the service address in the background is http://127.0.0.1:8081

So when the browser accesses, it also uses http://127.0.0.1:8080

If it is a domain name or extranet IP, Empathy

backstage If the service address in is http://www.xxx.com:8081

So when the browser accesses, it also uses http://www.xxx.com:8080

The address should be the same , Different ports

google browser , When the front end and the background are not on the same computer

The configuration shown in the figure needs to be modified

( Be careful , Just modify the background Try to clean up the browser cache )

 Chrome 91 The settings after version are as follows

find google Chrome Quick start icon , Right click , attribute , Add a string of codes in red ( The scarlet letter is preceded by a space , Otherwise you can't save )

Shortcut -》 The goal is :

"C:\ProgramFiles\Google\Chrome\Application\chrome.exe"--disable-features=SameSiteByDefaultCookies,CookiesWithoutSameSiteMustBeSecure

The default configuration of the new Google browser has changed , As a result, the cross domain threshold is raised , The front-end and back-end ports are different, and they are also cross domain , If IP Different browser configurations need to be modified . Previous Google browsers didn't have this problem , Maybe later versions will be updated and changed back , Firefox and other non google Kernel browsers don't have this problem ,

therefore , The browser configuration needs to be modified only when the two conditions are met at the same time

  1. Use google Kernel browser
  2. Front end and back end are deployed on different servers

In other cases, this configuration does not need to be modified

原网站

版权声明
本文为[FHAdmin]所创,转载请带上原文链接,感谢
https://yzsam.com/2021/11/20211124115422510Y.html