diff options
author | Amine Mouafik <amine@mouafik.fr> | 2020-02-22 21:34:12 +0100 |
---|---|---|
committer | Amine Mouafik <amine@mouafik.fr> | 2020-02-22 21:34:12 +0100 |
commit | f7422c3a9a02553991e9b96d03b76aed1173e71c (patch) | |
tree | c7d09e166abec04b1ba670f1e3437989ba910094 | |
parent | Review Custom Website URL validation (diff) | |
download | ferdium-recipes-f7422c3a9a02553991e9b96d03b76aed1173e71c.tar.gz ferdium-recipes-f7422c3a9a02553991e9b96d03b76aed1173e71c.tar.zst ferdium-recipes-f7422c3a9a02553991e9b96d03b76aed1173e71c.zip |
Validate all https responses different from 4xx
-rw-r--r-- | franz-custom-website.tar.gz | bin | 5541 -> 5558 bytes | |||
-rw-r--r-- | uncompressed/franz-custom-website/index.js | 2 |
2 files changed, 1 insertions, 1 deletions
diff --git a/franz-custom-website.tar.gz b/franz-custom-website.tar.gz index a2d7879..68153e2 100644 --- a/franz-custom-website.tar.gz +++ b/franz-custom-website.tar.gz | |||
Binary files differ | |||
diff --git a/uncompressed/franz-custom-website/index.js b/uncompressed/franz-custom-website/index.js index 86c3227..62f4218 100644 --- a/uncompressed/franz-custom-website/index.js +++ b/uncompressed/franz-custom-website/index.js | |||
@@ -6,7 +6,7 @@ module.exports = Franz => class CustomWebsite extends Franz { | |||
6 | const resp = await window.fetch(url, { | 6 | const resp = await window.fetch(url, { |
7 | method: 'GET' | 7 | method: 'GET' |
8 | }); | 8 | }); |
9 | return resp.status.toString().startsWith('2'); | 9 | return !resp.status.toString().startsWith('4'); |
10 | } catch (err) { | 10 | } catch (err) { |
11 | console.error(err); | 11 | console.error(err); |
12 | } | 12 | } |