I put the front-end static page on Ali Cloud"s oss object storage , and the server (node) runs on the CVM.
the front end needs cross-domain access to the server interface. The get
method is normal, but the post
method is wrong. A pre-request is sent before the post
method. method
is options
. Does the server"s routing table need to add a corresponding OPTIONS
route? do all post
routes have to write the corresponding optons
route? Please also give me some advice, please
the bandwidth of the PS: Tencent Cloud server is a small broken pipe of 1m, and there will be no cross-domain problem if the server is placed at the front end, but because the bandwidth is too small, the first screen has to wait for more than 10 seconds, so I think the server only does the function of the server, and the front end only adjusts the interface from the server.
get method is normal:
post:
nginx:
node: