angular/packages/platform-server/src
Adam 7301e70ddd fix(platform-server): correctly handle absolute relative URLs (#37341)
Previously, we would simply prepend any relative URL with the HREF
for the current route (pulled from document.location). However,
this does not correctly account for the leading slash URLs that
would otherwise be parsed correctly in the browser, or the
presence of a base HREF in the DOM.

Therefore, we use the built-in URL implementation for NodeJS,
which implements the WHATWG standard that's used in the browser.
We also pull the base HREF from the DOM, falling back on the full
HREF as the browser would, to form the correct request URL.

Fixes #37314

PR Close #37341
2020-06-09 08:27:00 -07:00
..
domino_adapter.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
http.ts fix(platform-server): correctly handle absolute relative URLs (#37341) 2020-06-09 08:27:00 -07:00
location.ts fix(platform-server): correctly handle absolute relative URLs (#37341) 2020-06-09 08:27:00 -07:00
platform-server.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
platform_state.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
private_export.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
server.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
server_events.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
server_renderer.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
styles_host.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
tokens.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
transfer_state.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
utils.ts docs(platform-server): fix renderModule usage guidance with Ivy (#37296) 2020-05-28 16:07:32 -04:00
version.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00