diff options
| author | tamaina <tamaina@hotmail.co.jp> | 2023-04-29 23:26:47 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-29 23:26:47 +0900 |
| commit | 09764b909b7843fcc1e143962a9fc1053b4937b7 (patch) | |
| tree | d79405cd3bf0ec52930b7cc80004af69cd431663 /packages/backend/src/misc/check-https.ts | |
| parent | test: Check availability of production build (#10734) (diff) | |
| download | sharkey-09764b909b7843fcc1e143962a9fc1053b4937b7.tar.gz sharkey-09764b909b7843fcc1e143962a9fc1053b4937b7.tar.bz2 sharkey-09764b909b7843fcc1e143962a9fc1053b4937b7.zip | |
enhance(dev): non-production環境でhttpサーバー間でもユーザー、ノートの連合が可能なように (#10717)
* enhance(dev): non-production環境でhttpサーバー間でもユーザー、ノートの連合が可能なように
* refactor (use checkHttps)
* MISSKEY_WEBFINGER_USE_HTTP
* Environment Variable readme
* NEVER USE IN PRODUCTION
* fix punyHost
Diffstat (limited to 'packages/backend/src/misc/check-https.ts')
| -rw-r--r-- | packages/backend/src/misc/check-https.ts | 4 |
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'); +} |