From 59fd4afe27bfd0a329e6739e057d6921b8328d8a Mon Sep 17 00:00:00 2001 From: Amine Mouafik Date: Sat, 22 Feb 2020 02:56:03 +0100 Subject: Review Custom Website URL validation --- uncompressed/franz-custom-website/index.js | 7 ++----- uncompressed/franz-custom-website/package.json | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) (limited to 'uncompressed') diff --git a/uncompressed/franz-custom-website/index.js b/uncompressed/franz-custom-website/index.js index 47da782..86c3227 100644 --- a/uncompressed/franz-custom-website/index.js +++ b/uncompressed/franz-custom-website/index.js @@ -4,12 +4,9 @@ module.exports = Franz => class CustomWebsite extends Franz { async validateUrl(url) { try { const resp = await window.fetch(url, { - method: 'GET', - headers: { - 'Content-Type': 'application/json' - } + method: 'GET' }); - return resp.status.toString().startsWith('2') || resp.status.toString().startsWith('3'); + return resp.status.toString().startsWith('2'); } catch (err) { console.error(err); } diff --git a/uncompressed/franz-custom-website/package.json b/uncompressed/franz-custom-website/package.json index 6c40697..457a8a1 100644 --- a/uncompressed/franz-custom-website/package.json +++ b/uncompressed/franz-custom-website/package.json @@ -1,7 +1,7 @@ { "id": "franz-custom-website", "name": "Custom Website", - "version": "1.0.1", + "version": "1.0.2", "description": "Add a custom website to Franz", "main": "index.js", "author": "Stefan Malzner ", -- cgit v1.2.3-54-g00ecf