stefanzweifel / screeenly

📸 Screenshot as a Service
https://secure.screeenly.com
MIT License
503 stars 103 forks source link

403 Error #232

Closed mocheaz closed 5 years ago

mocheaz commented 5 years ago

Suddenly, i started getting 403 errors.

This is the result i'm getting from the server,

<html>
<head><title>403 Forbidden</title></head>
<body bgcolor="white">
<center><h1>403 Forbidden</h1></center>
<hr><center>nginx/1.13.6</center>
</body>
</html>

I've tried with a fresh API key, same result.

stefanzweifel commented 5 years ago

Are you getting this error from screeenly.com?

mocheaz commented 5 years ago

Yes.

With postman, it's working. Only when sending from my server i'm getting this.

stefanzweifel commented 5 years ago

Currently on the road. Will look into this soon.

Only when sending from my server i'm getting this.

Can you share some code, how you‘ve implemented the Api on your server?

mocheaz commented 5 years ago

Sure thing.

        $newsletter = $this->newsletter;
        $path       = public_path('/screenshots/');
        $screenshot = new Screenshot('my-key-code');
        $screenshot->setWidth(600);
        $screenshot->capture('http://uwi.newsletterbuilder.io/newsletters/' . $newsletter->id . '/preview');
        $filename = 'newsletter-' . $newsletter->id . '-screenshot.jpg';
        $localPath  = $screenshot->store($path, $filename);
        $newsletter->screenshot = '/screenshots/'.$filename;
        $newsletter->save();
stefanzweifel commented 5 years ago

Thanks. Does your server IP end in 188.17?

I had to block an IP last week as it sent 1000s of requests per second.

mocheaz commented 5 years ago

Oops. Yes that’s mine.

What can we do?

Moche Azoulay 0527629782 On 17 Mar 2019, 17:03 +0200, Stefan Zweifel notifications@github.com, wrote:

Thanks. Does your server IP end in 188.17? I had to block an IP last week as it sent 1000s of requests per second. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

stefanzweifel commented 5 years ago

Ah well. I don't want you to share your email address here. Can you send me just an email with the link of this issue to hello@stefanzweifel.io?

We can discuss further stuff via mail.

All I can say here is, that your apps seems to send way too many request a as screeenly.com can handle. It seems you create screenshots for newsletters. Maybe you could queue these screeenly API calls?

Will close this issue for now.