-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enhance(server): better content type detection
- Loading branch information
Showing
4 changed files
with
40 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,33 @@ | ||
export const USER_ONLINE_THRESHOLD = 1000 * 60 * 10; // 10min | ||
export const USER_ACTIVE_THRESHOLD = 1000 * 60 * 60 * 24 * 3; // 3days | ||
|
||
// ブラウザで直接表示することを許可するファイルの種類のリスト | ||
// ここに含まれないものは application/octet-stream としてレスポンスされる | ||
// SVGはXSSを生むので許可しない | ||
export const FILE_TYPE_WHITELIST = [ | ||
'image/png', | ||
'image/gif', | ||
'image/jpeg', | ||
'image/webp', | ||
'image/apng', | ||
'image/bmp', | ||
'image/tiff', | ||
'image/x-icon', | ||
'video/mpeg', | ||
'video/mp4', | ||
'video/mp2t', | ||
'video/webm', | ||
'video/ogg', | ||
'video/3gpp', | ||
'video/quicktime', | ||
'video/x-m4v', | ||
'video/x-msvideo', | ||
'audio/mpeg', | ||
'audio/aac', | ||
'audio/wav', | ||
'audio/webm', | ||
'audio/ogg', | ||
'audio/x-m4a', | ||
'audio/x-flac', | ||
'application/ogg', | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
これだとimageよりも範囲広げちゃうので image && にしないと