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

Links ignore base href and screw up for SPAs #28

Closed
intellix opened this issue Jun 18, 2017 · 0 comments
Closed

Links ignore base href and screw up for SPAs #28

intellix opened this issue Jun 18, 2017 · 0 comments

Comments

@intellix
Copy link
Contributor

intellix commented Jun 18, 2017

I'm using Angular CLI which generates an index.html that looks like:

<base href="/">
<script type="text/javascript" src="vendor.0026832f8ecbfae87469.bundle.js"></script>

Without netjet, if I visit a page like: https://mysite.com/blah/blah the request would be made for: https://mysite.com/vendor.0026832f8ecbfae87469.bundle.js

With netjet, it's pushing a header like:

<vendor.0026832f8ecbfae87469.bundle.js>; rel=preload; as=script

Which triggers a request and gives a warning for: https://mysite.com/blah/blah/vendor.0026832f8ecbfae87469.bundle.js

Basically, the link header needs to also use the provided base[href] like so:

</vendor.0026832f8ecbfae87469.bundle.js>; rel=preload; as=script

screenshot 2017-06-18 17 07 31

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant