Skip to content

Commit

Permalink
extensions to ignore, fastify
Browse files Browse the repository at this point in the history
  • Loading branch information
PoOwAa committed Apr 16, 2023
1 parent 10a5ea4 commit d719f14
Show file tree
Hide file tree
Showing 2 changed files with 108 additions and 20 deletions.
127 changes: 107 additions & 20 deletions src/extensionsToIgnore.ts
Original file line number Diff line number Diff line change
@@ -1,44 +1,131 @@
/**
* List of extensions to ignore. These extensions won't be served by prerender.
* If you want to serve this type of files, please consider to use a CDN.
*
* TODO: Add more exact description
*/
export const extensionsToIgnore = [
'.js',
'.css',
'.xml',
'.less',
'.png',
'.jpg',
'.jpeg',
'.gif',
'.pdf',
'.doc',
'.txt',
'.ico',
'.rss',
'.zip',
'.mp3',
'.rar',
'.exe',
'.wmv',
'.doc',
'.avi',
'.ppt',
'.mpg',
'.mpeg',
'.tif',
'.wav',
'.mov',
'.psd',
'.ai',
'.xls',
'.mp4',
'.m4a',
'.swf',
'.dat',
'.dmg',
'.iso',
'.flv',
'.m4v',
'.torrent',
'.woff',
'.webmanifest',

/**
* Office documents
*/
'.doc',
'.docx',
'.docm',
'.dot',
'.dotx',
'.dotm',
'.xls',
'.xlsx',
'.xlsm',
'.xls',
'.xltx',
'.xltm',
'.xlsb',
'.xlam',
'.ppt',
'.pptx',
'.pptm',
'.pps',
'.ppsx',
'.ppsm',
'.pot',
'.potx',
'.potm',
'.ppam',
'.sld',
'.sldx',
'.sldm',
'.onetoc',
'.onetoc2',
'.onetmp',
'.onepkg',
'.thmx',

/**
* Fonts
*/
'.eot',
'.otf',
'.ttc',
'.ttf',
'.woff2',
'.woff',

/**
* Browser compatible media types
* @see https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Containers
*/
'.3gp',
'.3g2',
'.3gpp',
'.3gpp2',
'.aac',
'.adts',
'.amr',
'.avi',
'.awb',
'.drc',
'.flac',
'.m4a',
'.m4b',
'.m4p',
'.m4v',
'.mogg',
'.mp3',
'.mp4',
'.mp4a',
'.mp4b',
'.mpc',
'.mpg',
'.mpeg',
'.ogg',
'.oga',
'.opus',
'.wav',
'.webm',

/**
* Browser compatible image types
* @see https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Image_types
*
*/
'.apng',
'.avif',
'.gif',
'.jpg',
'.jpeg',
'.jfif',
'.pjpeg',
'.pjp',
'.png',
'.svg',
'.webmanifest'
];
'.webp',
'.bmp',
'.ico',
'.cur',
'.tif',
'.tiff',
];
1 change: 1 addition & 0 deletions src/middlewares/fastify.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// TODO: implement fastify plugin

0 comments on commit d719f14

Please sign in to comment.