during the deployment phase of the project, the front-end call interface is cross-domain. Should you set a reverse proxy on the web server or add cross-domain code on the server? which is better, or is there a better way?
during the deployment phase of the project, the front-end call interface is cross-domain. Should you set a reverse proxy on the web server or add cross-domain code on the server? which is better, or is there a better way?
server settings allow cross-domain. Now most of them do this, which is more convenient for
server. Originally, the performance bottleneck is the server, and then you add a proxy to become the minimum value of the server and your own proxy service (and even make many back-end functions useless), just for cross-domain.
Cross-domain is allowed, of course. Simple and convenient.
you can also make them support JSONP
doesn't work, be an agent. As a matter of fact, it's troublesome to play this thing well.
this is not a complete simple solution, but needs to be balanced in many aspects.
if the api provided by the server is stateless and the security requirements are not high, it is best to set the server to run across domains.
personally, there are many ways to solve project cross-domain problems simply. The use of proxy service in the project is not to solve cross-domain problems, such as load balancing, etc., which can be used to kill both cattle and chickens. I think it's a similar reason
there is a problem when using nginx to configure the front and back end to separate items. The front end is done with react and the routing is in history mode. The nginx configuration is as follows: server { listen 8000; server_name test; ...
url nginx this is the result of the request. It is found that the request address is still 127.0.0.1. Is there something wrong with it? ...
the server is the centos7.0 server component is nginx when configuring a reverse proxy, if you want to add this line in the red box, will report an error. How to solve this problem ...
after nginx sets the reverse proxy, the request shows Provisional headers are shown what to do ...
Front-end port nginx configuration server { listen 8000; -sharp server_name _; root home myftp dist; index index.html index.htm; location apis { rewrite ^.+apis ?(.*)$ $1 break; incl...
the proxy is used in the vue project. After build, the server on the configuration reported a 404 error, which should be caused by not being able to use the proxy of dev server. Configure how to use nginx, on the server to configure nginx to implement t...
centos,nginx configures the port. I really want to know the possible cause of this problem. Please ask the seniors to solve the problem ....
after being deployed a few days ago, the interfaces were all open, and then I didn t care. Today, suddenly 405, why did this happen? every time I configured nginx, I should not have done reload and restart. ...
server { listen 80; server_name localhost; -sharpcharset koi8-r; -sharpaccess_log logs host.access.log main; location { proxy_pass http: localhost:8080; } location apis { ...
vue uses history mode, refresh is always on the home page vue-router uses history mode. The server is configured according to the official website using nginx. Refresh will only return to the entrance . refresh is still on the original page ...
because the online environment of the company project is multiple regions, the request API at the front end and the configuration of some regions are different, so you need a unified configuration file to meet the different needs of each region. Currentl...
after installing verdaccio, use PM2 start verdaccio to report an error. The output of the log file is shown in the picture. After searching the Internet, it does not support es6. I don t know if any friends have encountered this problem. How to solve it...
after antPro is compiled, using the nginx agent, the nginx is configured as follows: server { listen 8080; server_name localhost; -sharpcharset koi8-r; -sharpaccess_log logs host.access.log main; ...
both front and back ends are on the same CVM. vue is deployed on nginx, using port 80 and port 8081 on springboot. After the project starts, both vue and backend interfaces can be accessed on my local computer. Sending post requests under the vue path ...