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

asp.net core serverside prerendering - fetch #156

Open
virzak opened this issue Nov 13, 2017 · 3 comments
Open

asp.net core serverside prerendering - fetch #156

virzak opened this issue Nov 13, 2017 · 3 comments

Comments

@virzak
Copy link

virzak commented Nov 13, 2017

Is there a way to configure our own fetch function?

This is needed to for server-side prerendering in ASP.NET core.

Particularly, ASP.NET Core needs to use a fetch that can takes a relative URL and self signed certificates

Here is an implementation of such fetch.

https://github.com/aspnet/JavaScriptServices/blob/dev/src/Microsoft.AspNetCore.SpaServices/npm/domain-task/src/fetch.ts

Thanks

@nason
Copy link
Collaborator

nason commented Nov 16, 2017

Hi @virzak -- great question. In the upcoming 2.0 release (see the next branch), the fetch polyfill is no longer provided and this middleware will use fetch from the global scope.

Would that work for your use case?

@virzak
Copy link
Author

virzak commented Nov 17, 2017

@nason Sounds like it would work, but needs to be tested. I would test it with ASP.NET Core reactredux template.

@nason
Copy link
Collaborator

nason commented Nov 20, 2017

Makes sense @virzak -- I have no experience with ASP.NET and wouldn't know where to begin :) Please let us know how it goes, if you do end up using this package in that environment.

2.0 was just released, so this should be ready to go.

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

No branches or pull requests

2 participants