Socket
Socket
Sign inDemoInstall

@fastify/static

Package Overview
Dependencies
34
Maintainers
18
Versions
29
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 6.9.0 to 6.10.0

1

index.js

@@ -281,2 +281,3 @@ 'use strict'

const routeOpts = {
constraints: opts.constraints,
schema: {

@@ -283,0 +284,0 @@ hide: typeof opts.schemaHide !== 'undefined' ? opts.schemaHide : true

4

package.json
{
"name": "@fastify/static",
"version": "6.9.0",
"version": "6.10.0",
"description": "Plugin for serving static files as fast as possible.",

@@ -57,3 +57,3 @@ "main": "index.js",

"tap": "^16.0.0",
"tsd": "^0.25.0"
"tsd": "^0.28.0"
},

@@ -60,0 +60,0 @@ "tsd": {

@@ -29,2 +29,3 @@ # @fastify/static

prefix: '/public/', // optional: default '/'
constraints: { host: 'example.com' } // optional: default {}
})

@@ -122,2 +123,9 @@

#### `constraints`
Default: `{}`
Constraints that will be added to registered routes. See Fastify's documentation for
[route constraints](https://www.fastify.io/docs/latest/Reference/Routes/#constraints).
#### `prefixAvoidTrailingSlash`

@@ -206,3 +214,3 @@

### `serveDotFiles`
#### `serveDotFiles`

@@ -209,0 +217,0 @@ Default: `false`

@@ -5,3 +5,3 @@ // Definitions by: Jannik <https://github.com/jannikkeye>

import { FastifyPluginAsync, FastifyRequest } from 'fastify';
import {FastifyPluginAsync, FastifyRequest, RouteOptions} from 'fastify';
import { Stats } from 'fs';

@@ -108,2 +108,3 @@

maxAge?: string | number;
constraints?: RouteOptions['constraints'];
}

@@ -110,0 +111,0 @@

@@ -6,3 +6,3 @@ import fastify, { FastifyInstance, FastifyPluginAsync, FastifyRequest } from 'fastify'

import fastifyStatic, {
FastifyStaticOptions,
FastifyStaticOptions,
fastifyStatic as fastifyStaticNamed,

@@ -59,2 +59,6 @@ } from '..'

return true;
},
constraints: {
host: /.*\.example\.com/,
version: '1.0.2'
}

@@ -61,0 +65,0 @@ }

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc