for example, I request localhost:8080/a/b/c.cd
proxy to http://www.aaaa.com/api/
can you change / a/b/c.cd
to / a/b/c
,
means that the agent rewrites the original path
before. for example, I request localhost:8080/a/b/c.cd
proxy to http://www.aaaa.com/api/
can you change / a/b/c.cd
to / a/b/c
,
means that the agent rewrites the original path
before.it should be possible to use rewrite https://blog.csdn.net/xmlovet.
app.use('/a/b/c.cd', proxy({
target: 'http://www.aaaa.com',
changeOrigin: true,
pathRewrite: {
'^/a/b/c.cd' : '/api/a/b/c',
},
}));
like this?
Previous: On the progress progress of uploading files by xhr
Next: Answer questions online? Increase or decrease in data?
I ve been looking for it for a long time, but I can t find it. 1. After the direct upload of web is completed, the server cannot know whether the file was uploaded successfully, who uploaded it, and the information of the file 2. Using web to dire...
var myNumber = { value: 1, add: function(i){ var helper = function(i){ console.log(this); this.value += i; } helper(i); } } myNumber.add(1); Why does this this point to window?? The add method called by the myNumber o...
1. Execute npm install-g pm2 2.pm2 pm2 start app.js pm2 3.ln -s root myapp pm2 usr local bin still failed to solve the problem messed up for a long time because no soft connection was created. ln -s root node-v8.9.0-linux-x64 lib node_...
var a = {0:"A",1:"B",2:"C",length:3}; var newa = Array.prototype.slice.call(a); console.log(newa); my understanding of this example is that the an object inherits and executes Array s slice method, but the slice method...
brief: because Mini Program s project uses wepy s framework, but you don t quite understand that the role of this interceptor is to integrate all the interfaces? Or? ...
ask the god to advise how to remove this? ...
I followed the online tutorials to the root directory and typed the command vim .bash _ profile to look like this? have you ever met a boss? What exactly is the problem? ...
1. Want to do an H5 multi-player online landlord game, the more annoying is the multi-person network communication 2. The front end uses canvas to realize animation, and adopts the idea of OOP object programming 3. The backend is ready to use the Node...
what if what I want to do is the effect of text wrapping, but it s not aligned in developer tools? I don t know why has no problem on the mobile phone. Do you have any advice from Boss CSS? ...
I followed the instructions of the great gods on the Internet, always reminding CKEDITOR is not defined, that he could not get the content with html format. The code is the source code downloaded directly without modification. this is $(document) .re...
the output results of the two types are not the same there is data in the obj output from the first picture, but it is undefined when it is obtained. ...
< H2 > problem source < H2 > recently Wechat Mini Game is very popular in moments; as an engineer, you can t be left behind; start research; don t use the development engine to develop; just the original set < H2 > problem points < H2 > play Wec...
step: 1. First, npm install webpack-g 2. Later, npm install webpack@1.15.0 was installed locally-- save-dev 3. Then execute webpack-v 4. Prompt: The CLI moved into a separate package: webpack-cli Would you like to install webpack-cli? (That will ...
class Home extends Component { constructor(props) { super(props) } doSomething() { } render() { return ( <div> <Child onDoSomething={this.doSomething} > ...
method to get cookie: main.js cookie cookie ...
as mentioned, the node egg.js development I use in the back end needs cookies, while the request used in the front end is fetch.js, but cannot complete the cross-domain request. 1.fetch main configuration credentials = include ,options.mode = "cor...
...
as shown in the figure, my project already has an eslint file, but I still can t find it when I report an error. Why? Mainly because it was all good before ...
I would like to ask js how to upload multiple pictures which have been selected by Filter? I m going to get the original name of the uploaded picture, and then match it with the name of the currently uploaded picture, but all I get is the name of the ...
there is usually a fixed process when developing a SPA like Vue, such as scaffolding to generate npm dependencies, then install dependencies, personalize Webpack configuration, jslint configuration, and then start writing components and so on. what ar...