Configuring web server (Windows 2019) with NAT instance

0

We have configured a fully functional Web server (Windows 2019) on a VPC behind a NAT instance (linux ami).
A domain name points to NAT instance, and the web server works great.

Running into an issue after we added reCaptcha on the login page.
It seems that it's not getting validation and timing out -- we have both v3 and v2 implemented.
I think this is a networking issue on the Windows 2019 instance, but not sure what exactly it is.
When I RDP to the Web server, and open a browser, I can't seem to get access to the internet out.
But the web application is successfully served through the web server via the NAT.

Since everything else is working on the vpc, routing tables, internet gateway on the AWS end, I don't think there are any issues there.
I can launch the same web server without the NAT instance by itself, and the reCaptcha works.
It only fails when it's launched behind the NAT.

Appreciate help and direction on resolving the reCaptcha issue.

Edited by: kkcan on Dec 8, 2020 2:30 PM

kkcan
demandé il y a 3 ans281 vues
1 réponse
0

Solution was making the recaptcha call asynchronous by setting async: true

grecaptcha.ready(function () {
grecaptcha.execute('@reCaptchav3SiteKey', { action: 'submit' }).then(function (token) {
console.log('v3 token: ' + token);
$('#CaptchaVersion').val('v3');
$('#CaptchaToken').val(token);
var postData = { token: token, version: 'v3' };
$.ajax({
type: 'POST',
async: true,
.... .... .... ...

kkcan
répondu il y a 3 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions