Skip to content
#

http-server

Here are 2,247 public repositories matching this topic...

caddy
mc0239
mc0239 commented Sep 30, 2020

Caddy version: v2.2.0 h1:sMUFqTbVIRlmA8NkFnNt9l7s0e+0gw+7GPIrhty905A=

I am trying to pass pem-encoded client certificate to proxied service via a X-SSL-Cert header, like so:

sub.example.com {
    reverse_proxy 127.0.0.1:8000 {
        header_up X-SSL-Cert {http.request.tls.client.certificate_pem}
    }

    tls {
        client_auth {
            mode require
        }
    }
}
asvetlov
asvetlov commented Nov 23, 2020

The library has many constant definitions that are declared as NAME = 'val', e.g. https://github.com/aio-libs/aiohttp/blob/master/aiohttp/client.py#L161

We need to add Final type hint to let users know that these constants should be considered as immutable (this hint doesn't prevent the actual modification and fully backward compatible).

from typing_extensions import Final  # suppor
armeria
ikhoon
ikhoon commented Mar 19, 2020

In our codebase, we push RequestContext and immediately run some code with try-with-resources.
For example:

try (SafeCloseable ignored = ctx.push()) {
    logger.trace(decorate(msg));
}

If RequestContext provides run(Runnable) or call(Callable) we can reduce boilerplate code and simplify it.

ctx.run(() -> logger.trace(decorate(msg));

This is inspired by g

Improve this page

Add a description, image, and links to the http-server topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the http-server topic, visit your repo's landing page and select "manage topics."

Learn more

You can’t perform that action at this time.