Skip to content
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

ng serve not working behind reverse proxy basehref/servepath #27576

Open
1 task done
everflux opened this issue May 1, 2024 · 1 comment
Open
1 task done

ng serve not working behind reverse proxy basehref/servepath #27576

everflux opened this issue May 1, 2024 · 1 comment
Labels
area: devkit/build-angular devkit/build-angular:dev-server freq1: low Only reported by a handful of users who observe it rarely needs: investigation Requires some digging to determine if action is needed severity3: broken type: bug/fix

Comments

@everflux
Copy link

everflux commented May 1, 2024

Command

serve

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

before vite

Description

I provide remote training for Angular using VSCode in the browser.
It is no longer possible to use the vscode port forwarding to access the ng dev server as basehref and servepath combinations to not yield the correct result when @angular node resources are to be loaded. It works for all other assets/files in the project.

Minimal Reproduction

Use code-server oder vscode server access through web browser.

ng new
ng serve --host 0.0.0.0 --disable-host-check

Open the forwarded port, URL becomes f.e.
https://student01.remote-training.de/proxy/4200/

Exception or Error

No response

Your Environment

Angular CLI: 17.3.6
Node: 20.12.2
Package Manager: npm 10.5.0
OS: linux x64

Angular: 17.3.7
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1703.6
@angular-devkit/build-angular   17.3.6
@angular-devkit/core            17.3.6
@angular-devkit/schematics      17.3.6
@angular/cli                    17.3.6
@schematics/angular             17.3.6
rxjs                            7.8.1
typescript                      5.4.5
zone.js                         0.14.5

Anything else relevant?

I tried various configuration combinations using prebundle, basehref and servepath only to experience worse problems like beeing redirected to https://student01.remote-training.de/proxy/4200/proxy/4200/

@everflux
Copy link
Author

What is the outcome of the investigation? Is there something I can help with?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: devkit/build-angular devkit/build-angular:dev-server freq1: low Only reported by a handful of users who observe it rarely needs: investigation Requires some digging to determine if action is needed severity3: broken type: bug/fix
Projects
None yet
Development

No branches or pull requests

2 participants