Bug Report or Feature Request (mark with an x)
- [X] bug report -> please search issues before submitting
- [ ] feature request
Command (mark with an x)
- [ ] new
- [ ] build
- [X] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc
Versions
Angular CLI: 6.0.5
Node: 8.11.3
OS: linux x64
Angular: 6.0.5
Repro steps
curl -sv "http://angular-app/someRoute" -H "Accept: text/html" returns 200
curl -sv "http://angular-app/someRoute" -H "Accept: */*" returns 404
run ng serve and try accessing the site in IE using short form for the url
Caveats
Do not use FQDN
Use a route fragment
Investigation
IE in some cases enforces compatibility mode for intranet sites.
Short form domain name makes IE think it's an intranet site
IE sends different Accept header in compatibility mode, but it does include a */* fallback
ng serve express middleware does some content negotiation and seems to ignore */* prefering text/html
The log given by the failure
No log. if DEBUG="*" ng serve is used, I can see the middleware sending 404.
Desired functionality
Content negotiation should correctly recognize the */* fallback
Bug Report or Feature Request (mark with an
x)Command (mark with an
x)Versions
Repro steps
curl -sv "http://angular-app/someRoute" -H "Accept: text/html"returns 200curl -sv "http://angular-app/someRoute" -H "Accept: */*"returns 404run
ng serveand try accessing the site in IE using short form for the urlCaveats
Do not use FQDN
Use a route fragment
Investigation
IE in some cases enforces compatibility mode for intranet sites.
Short form domain name makes IE think it's an intranet site
IE sends different Accept header in compatibility mode, but it does include a
*/*fallbackng serveexpressmiddleware does some content negotiation and seems to ignore*/*preferingtext/htmlThe log given by the failure
No log. if
DEBUG="*" ng serveis used, I can see the middleware sending 404.Desired functionality
Content negotiation should correctly recognize the
*/*fallback