mirror of
https://github.com/zhigang1992/create-react-app.git
synced 2026-05-11 19:42:13 +08:00
Fix internal linting setup and add missing headers (#1741)
This commit is contained in:
@@ -1,3 +1,15 @@
|
||||
// @remove-on-eject-begin
|
||||
/**
|
||||
* Copyright (c) 2015-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
// @remove-on-eject-end
|
||||
'use strict';
|
||||
|
||||
var chalk = require('chalk');
|
||||
var historyApiFallback = require('connect-history-api-fallback');
|
||||
var httpProxyMiddleware = require('http-proxy-middleware');
|
||||
@@ -69,7 +81,7 @@ module.exports = function addWebpackMiddleware(devServer) {
|
||||
var hpm = httpProxyMiddleware(pathname => mayProxy.test(pathname), {
|
||||
target: proxy,
|
||||
logLevel: 'silent',
|
||||
onProxyReq: function(proxyReq, req, res) {
|
||||
onProxyReq: function(proxyReq) {
|
||||
// Browers may send Origin headers even with same-origin
|
||||
// requests. To prevent CORS issues, we have to change
|
||||
// the Origin to match the target URL.
|
||||
|
||||
Reference in New Issue
Block a user