Skip to content

bind to lo interface only #1376

Description

@akomm

Issue details

I'm using the following config:

browserSync({
  port: 3000,
  host: '127.0.0.1',
  ui: {
    port: 3001
  },
  /* ... */
});

Starting the server with this config gives me the following feedback in terminal:

 ----------------------------------
       Local: http://localhost:3000
    External: http://127.0.0.1:3000
 ----------------------------------
          UI: http://localhost:3001
 UI External: http://127.0.0.1:3001
 ----------------------------------

The server is accessible via ALL interfaces on the machine.

Steps to reproduce/test case

Run the server with the given configuration (see above and below)

Please specify which version of Browsersync, node and npm you're running

  • Browsersync 2.18.5
  • Node 7.10.0
  • Npm 4.2.0

Affected platforms

  • linux
  • windows
  • OS X
  • freebsd
  • solaris

Browsersync use-case

  • API
  • Gulp
  • Grunt
  • CLI

for all other use-cases, (gulp, grunt etc), please show us exactly how you're using Browsersync

import browserSync from 'browser-sync';
import historyApiFallback from 'connect-history-api-fallback';
import webpack from 'webpack';
import webpackDevMiddleware from 'webpack-dev-middleware';
import webpackHotMiddleware from 'webpack-hot-middleware';
import config from '../webpack.config.dev';

const bundler = webpack(config);

browserSync({
  port: 3000,
  host: '127.0.0.1',
  ui: {
    port: 3001
  },
  server: {
    baseDir: 'src',

    middleware: [
      historyApiFallback(),

      webpackDevMiddleware(bundler, {
        publicPath: config.output.publicPath,
        noInfo: false,
        quiet: false,
        stats: {
          assets: false,
          colors: true,
          version: false,
          hash: false,
          timings: false,
          chunks: false,
          chunkModules: false
        },
      }),
      webpackHotMiddleware(bundler)
    ]
  },
  files: [
    'src/*.html'
  ]
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions