A
A
Anton Sashnin2016-09-03 12:17:12
linux
Anton Sashnin, 2016-09-03 12:17:12

Question about IIS on Windows Server 2012 R2. How to close CNA browser?

Hey!
I am working on a captive portal, IIS web server on Windows Server 2012 R2.
IIS is too lazy to install, this is the administrator's task, but the administrator is not the administrator, and it's easier for me to decide.
Does anyone know if this is possible on IIS?
The meaning is this:
Before connecting to a Wi-Fi network, all iOS devices (iPad, iPhone) send a get-request (with the User-Agent: CaptiveNetworkSupport field) to a random url from the built-in list of urls, if a response with the code != 200 is received , then the built-in CNA minibrowser opens in which the captive portal is loaded.
I need:
On the web server side, if a get request with User-Agent == CaptiveNetworkSupport comes in, then always return a response with a 200 code (thus fooling iOS and preventing the CNA from showing the minibrowser).
In the case of nginx, I would do this:
if ($http_user_agent ~* (CaptiveNetworkSupport)) { return 200; }

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Cheremisin, 2016-07-06
@Skrolea

Checking if mysql is running. And not just running, but responding!
The check is performed by accessing the muscle from a non-existent user UNKNOWN_MYSQL_USER
1) If the ping was completed without an error (the $? variable is 0) - do nothing
2) If it was completed with an error and "Access denied for user" was returned - we also do nothing

A
AxMuha, 2016-09-08
@AxMuha

At the application level, this is easy to do. Why go down to the IIS level?
And you don't need an admin :-)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question