question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Provide a way to support dev servers

See original GitHub issue

As seen in https://github.com/square/okhttp/issues/5845 and a metric shedload of stackoverflow posts

    private final static X509TrustManager TRUST_MANAGER = new X509TrustManager() {
        @Override
        public void checkClientTrusted(X509Certificate[] x509Certificates, String s) {
        }

        @Override
        public void checkServerTrusted(X509Certificate[] x509Certificates, String s) {
        }

        @Override
        public X509Certificate[] getAcceptedIssuers() {
            return new X509Certificate[0];
        }
    };

As it is it’s creating work for users and for us.

Is pretty much the 2nd most typed code in history after Hello World. We should either make an Intellij plugin to create it, or find a nicer and safer pattern to support dev servers?

Thoughts

cc @swankjesse

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
yschimkecommented, Mar 10, 2020

Yep. I might move the PR code relevant to this to a sample.

1reaction
Tolriqcommented, Mar 10, 2020

For information in some cases we have no choices than disable those security when connecting to badly configured servers with self signed certificates. From apps that connect to some devices and not public secure web servers.

We do this with tons of warning to user and a few confirmation clicks, but currently it’s fully disabled for that connection and as such is probably leaking that security removal when the server redirect to other things. Would be nice to have this debug thing allowed in prod and runtime configurable under a tons of opt in warning / lint checks whatever, so that we can lift those checks properly only for 1 IP and prevent bad implementation that goes out of that IP, because by lack of knowledge on how to do this right, I do use the OP code snippet for this. Or some better recipe about this use case.

Read more comments on GitHub >

github_iconTop Results From Across the Web

5 Ways to Improve your Production Web Application Server ...
One way to promote availability is to decrease the number of single points of failure in an environment. For example, using a static...
Read more >
Introduction to the server side - Learn web development | MDN
Servers can store and use information about clients to provide a convenient and tailored user experience. For example, many sites store credit ...
Read more >
The 10 Best Discord Servers for Web Developers - MakeUseOf
If you're a web developer looking for a place to connect with other developers, then these Discord servers offer an excellent platform for ......
Read more >
Webpack Dev Server - GitHub
--server-options-ca <value...> Path to an SSL CA certificate or content of an SSL CA certificate. --server-options-ca-reset Clear all items provided in 'server.
Read more >
Free for developers
free-for.dev ... and other offerings that have free tiers for developers. ... MailboxValidator — Email verification service using real mail server ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found