Skip to content

sockjs-node url is ignoring the 'pathname' part of the publicHost #15002

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sherif-elmetainy opened this issue Jul 5, 2019 · 1 comment · Fixed by #15003
Closed

sockjs-node url is ignoring the 'pathname' part of the publicHost #15002

sherif-elmetainy opened this issue Jul 5, 2019 · 1 comment · Fixed by #15003
Labels
Milestone

Comments

@sherif-elmetainy
Copy link

🐞 Bug report

Command (mark with an x)

- [ ] new
- [ ] build
- [x] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Is this a regression?

Yes, the previous version in which this bug was not present was: 8.0.6

Description

Running the command ng serve --public-host http://myhost.example.com/mypath cause the URL for loading sockjs-node script to ignore the /mypath (i.e. the pathname part) of the public host URL.

🔬 Minimal Reproduction

Run the command
ng serve --public-host http://myhost.example.com/mypath
Open the browser to the app URL and check the outgoing requests in network tab in developer tools

As the problem is not related to app code, any app created with ng new with default settings should be fine to reproduce the problem.

🔥 Expected Behaviour

Calls to sock-nodejs should look like this:
http://myhost.example.com/mypath/sockjs-node/info?t=123456

🔥 Actual Behaviour

The actual URL looks like this:
http://myhost.example.com/sockjs-node/info?t=123456

🌍 Your Environment


Angular CLI: 8.1.0
Node: 10.15.0
OS: win32 x64
Angular: 8.1.0
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.801.0
@angular-devkit/build-angular     0.801.0
@angular-devkit/build-optimizer   0.801.0
@angular-devkit/build-webpack     0.801.0
@angular-devkit/core              8.1.0
@angular-devkit/schematics        8.1.0
@ngtools/webpack                  8.1.0
@schematics/angular               8.1.0
@schematics/update                0.801.0
rxjs                              6.5.2
typescript                        3.4.5
webpack                           4.35.2

Anything else relevant?
This was working fine in 8.0.6. Updating to 8.1.0 (using ng update) caused the problem. Reverting back to 8.0.6 solves the problem.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
2 participants