Fix internal linting setup and add missing headers (#1741)

This commit is contained in:
Dan Abramov
2017-03-06 14:20:29 +00:00
committed by GitHub
parent 03d15f4fd3
commit 1bfd5dafdf
81 changed files with 606 additions and 11 deletions

View File

@@ -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.