summaryrefslogtreecommitdiff
path: root/packages/backend/src/misc/check-https.ts
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2023-05-09 09:17:34 +0900
committerGitHub <noreply@github.com>2023-05-09 09:17:34 +0900
commit94690c835e3179e3fd616758ad00a8b66d844a0a (patch)
tree3171356ca8298aa6caae7c95df7232844163f913 /packages/backend/src/misc/check-https.ts
parentMerge pull request #10608 from misskey-dev/develop (diff)
parent[ci skip] 13.12.0 (diff)
downloadmisskey-94690c835e3179e3fd616758ad00a8b66d844a0a.tar.gz
misskey-94690c835e3179e3fd616758ad00a8b66d844a0a.tar.bz2
misskey-94690c835e3179e3fd616758ad00a8b66d844a0a.zip
Merge pull request #10774 from misskey-dev/develop
Release: 13.12.0
Diffstat (limited to 'packages/backend/src/misc/check-https.ts')
-rw-r--r--packages/backend/src/misc/check-https.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/packages/backend/src/misc/check-https.ts b/packages/backend/src/misc/check-https.ts
new file mode 100644
index 0000000000..b33f019973
--- /dev/null
+++ b/packages/backend/src/misc/check-https.ts
@@ -0,0 +1,4 @@
+export function checkHttps(url: string) {
+ return url.startsWith('https://') ||
+ (url.startsWith('http://') && process.env.NODE_ENV !== 'production');
+}