Skip to content

deployUrl not bound correctly #5254

Closed
@es-lab

Description

@es-lab

OS?

macOS Sierra

Versions.

@angular/cli: 1.0.0-rc.1
node: 7.7.1
os: darwin x64
@angular/common: 2.4.9
@angular/compiler: 2.4.9
@angular/core: 2.4.9
@angular/forms: 2.4.9
@angular/http: 2.4.9
@angular/platform-browser: 2.4.9
@angular/platform-browser-dynamic: 2.4.9
@angular/router: 3.4.9
@angular/cli: 1.0.0-rc.1
@angular/compiler-cli: 2.4.9

Repro steps.

Build with ng build -prod -deploy-url=http://sub.domain.com/.
In css files the links for images/fonts/etc.. are set like this: /http:/sub.domain/com/assets/....
The browsers tries to load the following url: http://domain.com/http:/sub.domain/com/assets/...

Mention any other details that might be useful.

My assets and every additional file but the index.html are served from http://sub.domain.com/ because of my backend. When I was using version beta26, setting deployUrl=http://sub.domain.com/ worked for files inside the index.html (but not for the favicon, this is an issue still in rc1, please put the deployUrl for the favicon too!). There were still issues with imgs, and other assets, a workaround was loading them through css, but this worked only if loading them in the style that was loaded form the subdomain, images loaded from inline style still failed.
Now with rc1 I see that you put the deployUrl in styles too, this is good, but it works only for path prefixes, not entire hosts like in my use case.

Metadata

Metadata

Assignees

Labels

P1Impacts a large percentage of users; if a workaround exists it is partial or overly painfultype: bug/fix

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions