|
|
@ -6,6 +6,7 @@ import {ServerRegisterPluginObject, Plugin, Server, Request, ResponseObject} fro |
|
|
|
import Hoek from "@hapi/hoek" |
|
|
|
import HapiYar from "@hapi/yar"; |
|
|
|
import HapiCrumb from "@hapi/crumb" |
|
|
|
import { Stream } from "stream"; |
|
|
|
|
|
|
|
export default [ |
|
|
|
{ |
|
|
@ -94,9 +95,13 @@ export default [ |
|
|
|
options: { |
|
|
|
autoGenerate: true, |
|
|
|
logUnauthorized: true, |
|
|
|
// skip: function(request, reply) {
|
|
|
|
// return true;
|
|
|
|
// },
|
|
|
|
skip: function(request, reply) { |
|
|
|
// 流的话直接通过,不需要验证,主要用于传递form-data数据时这里通不过
|
|
|
|
if(request.payload instanceof Stream){ |
|
|
|
return true |
|
|
|
} |
|
|
|
return false; |
|
|
|
}, |
|
|
|
cookieOptions: { |
|
|
|
path: '/', |
|
|
|
isSecure: false |
|
|
|