Skip to content

Subdomains not working in 1.0.0 #2233

Closed
@anomaly44

Description

@anomaly44

Description

Since 1.0.0 we cannot visit subdomains on the dev server anymore. This is usfeful for devs who use subdomains to serve different data based on subdomains with CRA.

Expected behavior

Visiting the app on http://test.localhost:3000/ should display the app the same as the usual: http://localhost:3000/

Actual behavior

Instead of the app we get: Invalid Host header

Reproducible Demo

create a new react app and visit any subdomain.

Extra

  • Would it be possible to add an option to the package json to use
    disableHostCheck: true
    in the webpackDevServer.config ?
  • is it possible to add an option to open the browser on a subdomain?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions