【文件属性】:
文件名称:hapi-redirects:重定向hapi插件
文件大小:9KB
文件格式:ZIP
更新时间:2021-05-10 03:50:29
hapi-plugin hapi-v17 JavaScript
重定向
Hapi重定向插件
安装
npm install --save hapi-redirects
用法
server . register ( [
{
plugin : require ( 'hapi-redirects' ) , options : {
log : true ,
log404 : true ,
// can match any valid hapi route specifier including route params and redirect to the specified value:
redirects : {
"/shortlink" : "/a/much/longer/path?search=longer" ,
'/post/(.*)/' : '/cats
【文件预览】:
hapi-redirects-master
----.gitignore(22B)
----package.json(767B)
----.npmrc(19B)
----.travis.yml(43B)
----LICENSE(1KB)
----index.js(123B)
----CHANGELOG.md(896B)
----README.md(2KB)
----example()
--------index.js(2KB)
----lib()
--------index.js(3KB)
--------paramReplacer.js(778B)
--------processRedirect.js(2KB)
----test()
--------redirects.test.js(14KB)