gin-gonic / autotls

Support Let's Encrypt for a Go server application.
MIT License
379 stars 40 forks source link

refactor(redirect): Use RequestURI #23

Closed icbd closed 4 years ago

icbd commented 4 years ago

RequestURI is the unmodified request-target of the Request-Line as sent by the client to a server.

appleboy commented 4 years ago

See https://golang.org/pkg/net/http/#Request

    // URL specifies either the URI being requested (for server
    // requests) or the URL to access (for client requests).
    //
    // For server requests, the URL is parsed from the URI
    // supplied on the Request-Line as stored in RequestURI.  For
    // most requests, fields other than Path and RawQuery will be
    // empty. (See RFC 7230, Section 5.3)
    //
    // For client requests, the URL's Host specifies the server to
    // connect to, while the Request's Host field optionally
    // specifies the Host header value to send in the HTTP
    // request.
    URL *url.URL