Home › Forums › Support › 404 with require_https and cloudflare This topic contains 8 replies, has 3 voices, and was last updated by bbrendon 2 weeks, 5 days ago. Viewing 9 posts - 1 through 9 (of 9 total) Author Posts February 20, 2019 at 1:58 pm #19567 CMAWParticipant My site is using a subdomain for invoice ninja http://invoice.mywebsite.com The site is hosted with GoDaddy on a shared server. I have a Cloudflare A record configured to point to my host IP which will serve the website over HTTPS As soon as I turn on REQUIRE_HTTPS=true in .env – I am unable to access the site over HTTPS. The APP_URL in .env is set to https://invoice.mywebsite.com My site works absolutely fine over HTTP Can anyone help? February 20, 2019 at 2:51 pm #19568 CMAWParticipant Almost able to resolve my own issue Changed Cloudflare SSL type from Full to Flexible I get an error: ERR_TOO_MANY_REDIRECTS If I change TRUSTED_PROXIES in env to TRUSTED_PROXIES=”*” it then works over HTTPS however not recommended Can anyone advise how this can be secured? February 20, 2019 at 3:26 pm #19570 Hillel CorenKeymaster If you know the IPs you could specify them rather than use * February 20, 2019 at 4:05 pm #19571 CMAWParticipant Hi Hillel, I tried this but got the same issue I’m not too familiar with Laravel – perhaps the syntax is incorrect? TRUSTED_PROXIES=”22.214.171.124/22″,”126.96.36.199/22″,”188.8.131.52/22″,”184.108.40.206/12″,”220.127.116.11/18″,”18.104.22.168/22″,”22.214.171.124/18″,”126.96.36.199/15″,”188.8.131.52/13″,”184.108.40.206/20″,”220.127.116.11/20″,”18.104.22.168/20″,”22.214.171.124/22″,”126.96.36.199/17″ February 20, 2019 at 4:08 pm #19572 Hillel CorenKeymaster I think you have too many quotes, it should be “ip,ip,ip,…” February 20, 2019 at 4:20 pm #19573 CMAWParticipant Tried that also but same issue I will continue to work on a solution and post here when resolved October 24, 2019 at 2:06 am #22296 bbrendonParticipant Did you figure this out? I’m using nginx (proxy_pass) for invoice ninja and I have only been able to get it work if I specify an (*) asterisk as TRUSTED_PROXIES. I tried specifying a single IP address of nginx but that didn’t work. I also tried CIDR notation, also did not work. Does anyone know that TRUSTED_PROXIES actually does? October 24, 2019 at 5:34 am #22297 Hillel CorenKeymaster TRUSTED_PROXIES accepts a comma delimited list of subnets https://invoice-ninja.readthedocs.io/en/latest/configure.html#using-a-reverse-proxy October 24, 2019 at 6:03 am #22298 bbrendonParticipant Yea. I tried exactly TRUSTED_PROXIES=’10.0.0.0/8,172.16.0.0/12,192.168.0.0/16′ which is basically * …but they don’t work equally. After I put the right IP address it worked. Lol. Not sure where I came up with the IP I tried originally. Brain fart. Author Posts Viewing 9 posts - 1 through 9 (of 9 total) You must be logged in to reply to this topic.