Resolving the cross-domain Server proxy http-proxy-middleware module

Source: Internet
Author: User
Tags domain server

Mounting module
Yarn Add Http-proxy-middleware
Introducing Modules

App.js

var proxy = require ("Http-proxy-middleware");
Using modules

App.js

var app = Express ();
The requested routing address (interface file) for cross-domain request of the protocol domain name
true}))
Front-End Access interface

Index.html

$.ajax ({type:"get",
Direct incoming routing address without adding a domain name URL:"/ajax_www_68ecshop_com.php?act=tipword&word=xiaomi&152790640006565",  DataType:"JSON", success:function(data) {Console.log (data); }
})

Resolving the cross-domain Server proxy http-proxy-middleware module

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.