gulp使用gulp-webserver解决跨域问题

  1. 新闻资讯
  2. 技术百科
公司新闻 案例分享 技术百科 行业动态

gulp使用gulp-webserver解决跨域问题

来源:奇站网络 浏览量:74 发布日期: 2024-03-26

配置当前路径映射到其他端口路径上,解决跨域问题

  1. gulp.task('server', function() {
  2. gulp.src(dist)
  3. .pipe(webserver({
  4. host: 'localhost',
  5. port: 80,
  6. path: '/',
  7. livereload: false,
  8. proxies: [{
  9. source: '/h5',
  10. target: 'http://localhost:8080/h5'
  11. }]
  12. }))
  13. });
标签:
下一篇 git 更换地址

厦门奇站网络科技有限公司

电话:13313868605

QQ:3413772931

地址:厦门集美区软件园三期

网站地图


                    扫一扫加我咨询