Nginx reverse proxy will get "broken header"

Started by akong77, November 04, 2020, 02:54:44 AM

Previous topic - Next topic
Hello,
I has setup nginx reverse proxy all done.It's can success to browsers it.
But if I enable OPNSense -- Service -- nginx -- HTTP Server Proxy Protocol and Real IP.It's can't see web page.The Opnsense nginx log will show

Quote2020/11/04 09:38:24 [error] 36521#100138: *10 broken header: "GET / HTTP/1.1
Host: ab.aspa.idv.tw
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:82.0) Gecko/20100101 Firefox/82.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Language: zh-TW,zh;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Connection: keep-alive
Cookie: tk_or=%22%22; tk_lr=%22%22; _ga=GA1.3.660938322.1583392563; __gads=ID=9f57df3da7e19b8a-22892d044cc40098:T=1603244370:RT=1603244370:S=ALNI_MZFwjrtEaJJTdt4YXsnxyXVPR0Jcw
Upgrade-Insecure-Requests: 1

" while reading PROXY protocol, client: 203.74.122.103, server: 0.0.0.0:80
Could I miss some setup?

I hope know if I want web server can show real IP.How to do it?

Maybe real IP and trusted proxy in combination is what you look for.


The trusted proxy is a previous proxy from which the real IP address is accepted.