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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠