Captive portal how to request

Hello, I have a question. How can I make fully capable captive portal for windows 10/11 (chrome, opera etc) clients. Today my setup is such - there is some Juniper device out there that redirects user's traffic on some IP where the captive portal lives. Everything is fine till the windows test users come in and break the whole scenario in such way: they receive IP and open browser but instead of captive portal's web page, they receives some ssl_cert_error instead of this service page.
here is the schema -> of request
user types is -> juniper allows dns request and redirects to my captive portal server -> captive portal server takes request with ip address of searched server and redirects it to the local web server
as a result user gets the ssl_cert_error on windows.

Thanks for commenting this thread.
Have a nice day