Browse Source

fixed upload

theme
npmrun 2 years ago
parent
commit
0b906730d0
  1. 11
      source/plugins/index.ts

11
source/plugins/index.ts

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

Loading…
Cancel
Save