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
已提问 3 年前278 查看次数
1 回答
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
已回答 3 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则