Re: Variable that holds scheme

Andrew Howe <[email protected]> Wed, 13 Apr 2022 12:04:39 +0100
Newsgroups gmane.comp.apache.mod-security.user
Message-ID <CADi1syB7YO-APhN5qx5io-zWXo1qfp_x1XbFKis3xZLQuwD3Gg@mail.gmail.com>
Hi Ehsan,

> This question might look basic, but I could not find the variable that holds or contains the (http|https) scheme.

Where are you trying to pull the scheme from? The scheme isn't
typically* transmitted in an HTTP request.

A URL will usually be broken up into an HTTP request line and a Host
header, which usually looks something like:

    GET /docs/ HTTP/2
    Host: coreruleset.org

No scheme/protocol.

What are you trying to achieve? Are you trying to answer the question
"did this request come in as plain text HTTP or has TLS termination
been performed", and then treat the two cases differently?

Thanks,
Andrew


*You may find request lines containing a full 'absolute URI' which
includes the scheme, for example with a proxy server.
-- 

Andrew Howe
Loadbalancer.org Ltd.
www.loadbalancer.org
+1 888 867 9504 / +44 (0)330 380 1064


_______________________________________________
mod-security-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mod-security-users
Commercial ModSecurity Rules and Support from Trustwave's SpiderLabs:
http://www.modsecurity.org/projects/commercial/rules/
http://www.modsecurity.org/projects/commercial/support/