-
Notifications
You must be signed in to change notification settings - Fork 303
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
html: fix
too_many_redirects
handler and use it for FB
- Loading branch information
1 parent
b925fa7
commit 63d490c
Showing
3 changed files
with
25 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
export default { | ||
|
||
provides: 'meta', | ||
|
||
getData: function(url, __statusCode, options, cb) { | ||
|
||
return __statusCode !== 429 && __statusCode !== 403 &&__statusCode !== 508 | ||
|
||
? cb({ | ||
responseStatusCode: __statusCode, | ||
}) | ||
|
||
: cb(null, { | ||
meta: {}, | ||
message: `${options.provider || 'Publisher'} is rate-limiting. Meta disabled.` | ||
}) | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters