-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't allow access by IP address. #8
Comments
Hi @ericc06, try to clear the prod cache on your online server. |
Sorry, I forgot to say that I cleared the cache and that my website is in the prod environment. |
try to catch $_SERVER['REMOTE_ADDR'] on your server and compare with your ips conf. Are you on an online server with APP_ENV=prod ? |
Yes, my website is online and configured with APP_ENV=prod. But the $_SERVER['REMOTE_ADDR'] variable does not contain my public IP address, but a private one (172.16.2.1). On the other hand, if in the Twig template I display the app.request object, I can see my public IP address: |
Due to Azure (like many other providers) architecture, with load balancers and other network equipments in front of the web server, we can't get the remote IP address with $_SERVER['REMOTE_ADDR']. Do you have an idea to make the bundle work in this case? |
Hi, yes i need to test HTTP_X_FORWARDED_FOR or used $request->getClientIp(). |
I'm sorry, the issue is not fixed in my case. |
Hi,
I can't allow access to my website while in maintenance mode with my public IP address.
Here is my artgris_maintenance.yaml:
artgris_maintenance:
enable: true
ips: ["11.22.33.44"]
response: 503
where 11.22.33.44 is my public IP address as given by https://www.whatismyip.com/
When I access my website from my PC through the Internet, all I can see is the maintenance page.
Symfony 5.2.10
Artgris MaintenanceBundle 1.1
Thank you,
Eric
The text was updated successfully, but these errors were encountered: