Skip to content

Commit

Permalink
[fix] style nits
Browse files Browse the repository at this point in the history
  • Loading branch information
jcrugzz committed Oct 22, 2016
1 parent 220f5fb commit d0f1dfe
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions lib/http-proxy.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//use explicit /index.js to help browserify negociation in require '/lib/http-proxy' (!)
// Use explicit /index.js to help browserify negociation in require '/lib/http-proxy' (!)
var ProxyServer = require('./http-proxy/index.js').Server;


Expand All @@ -18,7 +18,7 @@ var ProxyServer = require('./http-proxy/index.js').Server;
*/


var createProxyServer = function(options) {
function createProxyServer(options) {
/*
* `options` is needed and it must have the following layout:
*
Expand All @@ -35,7 +35,7 @@ var createProxyServer = function(options) {
* ignorePath: <true/false, Default: false - specify whether you want to ignore the proxy path of the incoming request>
* localAddress : <Local interface string to bind for outgoing connections>
* changeOrigin: <true/false, Default: false - changes the origin of the host header to the target URL>
* auth : Basic authentication i.e. 'user:password' to compute an Authorization header.
* auth : Basic authentication i.e. 'user:password' to compute an Authorization header.
* hostRewrite: rewrites the location hostname on (301/302/307/308) redirects, Default: null.
* autoRewrite: rewrites the location host/port on (301/302/307/308) redirects based on requested host/port. Default: false.
* protocolRewrite: rewrites the location protocol on (301/302/307/308) redirects to 'http' or 'https'. Default: null.
Expand Down
6 changes: 3 additions & 3 deletions lib/http-proxy/passes/web-incoming.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ module.exports = {
* @api private
*/

deleteLength : function deleteLength(req, res, options) {
deleteLength: function deleteLength(req, res, options) {
if((req.method === 'DELETE' || req.method === 'OPTIONS')
&& !req.headers['content-length']) {
req.headers['content-length'] = '0';
Expand Down Expand Up @@ -62,7 +62,7 @@ module.exports = {
* @api private
*/

XHeaders : function XHeaders(req, res, options) {
XHeaders: function XHeaders(req, res, options) {
if(!options.xfwd) return;

var encrypted = req.isSpdy || common.hasEncryptedConnection(req);
Expand Down Expand Up @@ -94,7 +94,7 @@ module.exports = {
* @api private
*/

stream : function stream(req, res, options, _, server, clb) {
stream: function stream(req, res, options, _, server, clb) {

// And we begin!
server.emit('start', req, res, options.target)
Expand Down
6 changes: 3 additions & 3 deletions lib/http-proxy/passes/web-outgoing.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module.exports = { // <--
*
* @api private
*/
removeChunked : function removeChunked(req, res, proxyRes) {
removeChunked: function removeChunked(req, res, proxyRes) {
if (req.httpVersion === '1.0') {
delete proxyRes.headers['transfer-encoding'];
}
Expand Down Expand Up @@ -82,7 +82,7 @@ module.exports = { // <--
*
* @api private
*/
writeHeaders : function writeHeaders(req, res, proxyRes, options) {
writeHeaders: function writeHeaders(req, res, proxyRes, options) {
var rewriteCookieDomainConfig = options.cookieDomainRewrite;
if (typeof rewriteCookieDomainConfig === 'string') { //also test for ''
rewriteCookieDomainConfig = { '*': rewriteCookieDomainConfig };
Expand All @@ -107,7 +107,7 @@ module.exports = { // <--
*
* @api private
*/
writeStatusCode : function writeStatusCode(req, res, proxyRes) {
writeStatusCode: function writeStatusCode(req, res, proxyRes) {
// From Node.js docs: response.writeHead(statusCode[, statusMessage][, headers])
if(proxyRes.statusMessage) {
res.writeHead(proxyRes.statusCode, proxyRes.statusMessage);
Expand Down

0 comments on commit d0f1dfe

Please sign in to comment.