diff options
author | 2020-02-22 21:34:12 +0100 | |
---|---|---|
committer | 2020-02-22 21:34:12 +0100 | |
commit | f7422c3a9a02553991e9b96d03b76aed1173e71c (patch) | |
tree | c7d09e166abec04b1ba670f1e3437989ba910094 /uncompressed/franz-custom-website/index.js | |
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
Diffstat (limited to 'uncompressed/franz-custom-website/index.js')
-rw-r--r-- | uncompressed/franz-custom-website/index.js | 2 |
1 files changed, 1 insertions, 1 deletions
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 | } |