Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CloudFront is blocking requests #74

Open
rohitkolapkar opened this issue May 7, 2021 · 13 comments
Open

CloudFront is blocking requests #74

rohitkolapkar opened this issue May 7, 2021 · 13 comments

Comments

@rohitkolapkar
Copy link

Vaccine availability checker started.

RESPONSE DATA

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>ERROR: The request could not be satisfied</TITLE>
</HEAD><BODY>
<H1>403 ERROR</H1>
<H2>The request could not be satisfied.</H2>
<HR noshade size="1px">
Request blocked.
We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.
<BR clear="all">
If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.
<BR clear="all">
<HR noshade size="1px">
<PRE>
Generated by cloudfront (CloudFront)
Request ID: IHdc-ukdjPxaoqw6sH7UKF3TZxnpG8v_xmrCL0f1m7eVPL-Q0Wj6Ow==
</PRE>
<ADDRESS>
</ADDRESS>
</BODY></HTML>

RESPONSE STATUS

403

RESPONSE HEADERS

{
  server: 'CloudFront',
  date: 'Fri, 07 May 2021 19:13:59 GMT',
  'content-type': 'text/html',
  'content-length': '919',
  connection: 'close',
  'x-cache': 'Error from cloudfront',
  via: '1.1 a35f3496e12ed4f14d5a938f1d80b6f6.cloudfront.net (CloudFront)',
  'x-amz-cf-pop': 'BOM51-C1',
  'x-amz-cf-id': 'IHdc-ukdjPxaoqw6sH7UKF3TZxnpG8v_xmrCL0f1m7eVPL-Q0Wj6Ow=='
}
@catrawalkar
Copy link

Got same error, I then gave proper headers... Got it resolved

@devsum1
Copy link

devsum1 commented May 8, 2021

@catrawalkar can you please provide your headers you are passing in request?

@rohitkolapkar
Copy link
Author

@Sumit9896926322 explicitly provide some other User-Agent in headers.
It worked for me.
I think, axios user agent is blocked by cloudfront.

@devsum1
Copy link

devsum1 commented May 8, 2021

@rohitkolapkar thanks,it worked for me.

@sid8840
Copy link

sid8840 commented May 8, 2021

@rohitkolapkar thanks,it worked for me.

can you provide steps that you have modified to get it worked?

@rohitkolapkar
Copy link
Author

rohitkolapkar commented May 8, 2021

@sid8840
Find the configuration for axios call. In headers, add 'User-Agent':'search user agents on google and replace this value'.

@devsum1
Copy link

devsum1 commented May 8, 2021

@rohitkolapkar some of my requests failed with unauthenticated access can you explain why?

@CyberSG27
Copy link

'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36', add this in vaccineNotifier.js in headers

@soul0101
Copy link

soul0101 commented May 8, 2021

This works when I run it on my local machine but throws an error when I use repl.it. Any idea why?

@JPRMohnish
Copy link

JPRMohnish commented May 8, 2021

Got same error, I then gave proper headers... Got it resolved

I am getting same error tried requests it also didn't work.
Can you give the headers . I was making a CLI tool for the same. API

@debmalyapan53
Copy link

I passed these headers and it worked.
'Host': 'cdn-api.co-vin.in',
'User-Agent': 'PostmanRuntime/7.26.8'

@JPRMohnish
Copy link

THank You so Much it worked !!

@sonalsatpute
Copy link

Headers will work.

Just to be a good citizen; don't pull the 10 days continuously 1 day is enough to get the notification or explicit check the date and set the corn job for 5 minutes or so, else they might block your IP considering a denial-of-service (DDoS) attack.

@sonalsatpute sonalsatpute mentioned this issue May 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants