<div dir="ltr">--- ngx_http_referer_module.c<br>+++ ngx_http_referer_module.c<br>@@ -147,10 +147,12 @@<br> <br>         if (ngx_strncasecmp(ref, (u_char *) "http://", 7) == 0) {<br>             ref += 7;<br>+            len -= 7;<br>
             goto valid_scheme;<br> <br>         } else if (ngx_strncasecmp(ref, (u_char *) "https://", 8) == 0) {<br>             ref += 8;<br>+            len -= 8;<br>             goto valid_scheme;<br>         }<br>
     }<br>@@ -191,7 +193,7 @@<br>         ngx_int_t  rc;<br>         ngx_str_t  referer;<br> <br>-        referer.len = len - 7;<br>+        referer.len = len;<br>         referer.data = ref;<br> <br>         rc = ngx_regex_exec_array(rlcf->regex, &referer, r->connection->log);<br>
</div>