https://github.com/voxpelli/fastify-enforce-host
Enforce a specific host name for your Fastify app
https://github.com/voxpelli/fastify-enforce-host
fastify fastify-plugin
Last synced: about 1 year ago
JSON representation
Enforce a specific host name for your Fastify app
- Host: GitHub
- URL: https://github.com/voxpelli/fastify-enforce-host
- Owner: voxpelli
- License: mit
- Created: 2023-06-15T14:42:13.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-01-21T12:14:49.000Z (over 1 year ago)
- Last Synced: 2025-04-24T01:07:27.307Z (about 1 year ago)
- Topics: fastify, fastify-plugin
- Language: JavaScript
- Homepage:
- Size: 29.3 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Fastify Enforce Host
Enforce a specific host name for your Fastify app
[](https://www.npmjs.com/package/@voxpelli//fastify-enforce-host)
[](https://www.npmjs.com/package/@voxpelli//fastify-enforce-host)
[](https://github.com/neostandard/neostandard)
[](https://github.com/voxpelli/badges-cjs-esm)
[](https://github.com/voxpelli/types-in-js)
[](https://mastodon.social/@voxpelli)
## Usage
```javascript
import { fastify } from 'fastify';
const app = fastify();
app.register(import('@voxpelli/fastify-enforce-host'), {
baseUrl: 'http://localhost:3000/',
});
```