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

Documentation or Implementation for Disabling SSL Verification #1354

Closed
julkue opened this issue Oct 8, 2019 · 2 comments
Closed

Documentation or Implementation for Disabling SSL Verification #1354

julkue opened this issue Oct 8, 2019 · 2 comments

Comments

@julkue
Copy link

julkue commented Oct 8, 2019

Currently, in my graphql.module.ts file I'm returning my Apollo instance like that:

export function createApollo(httpLink: HttpLink) {
  return {
    link: httpLink.create({
      uri
    }),
    cache: new InMemoryCache(),
  };
}

This only works when the specified uri has a SSL certificate. In my case, it's a self-signed certificate, which makes the request fail with status code 0 Unknown error.

So, I can currently work around the problem with:

process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';

But isn't there a better way like this one (when using Next.js)?

@kamilkisiela
Copy link
Owner

I don't see how it's related to Apollo. HttpLink uses HttpClient under the hood and only that so it's pure Angular's HttpClient thing.

@julkue
Copy link
Author

julkue commented Oct 14, 2019

Yes, that might be the case. That's why I've referenced the angular issue and mentioned in the subject that this issue can also be about a documentation improvement in this regard. I think it's a common use case to consume data from a dev server during development with a self signed certificate.

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

2 participants