Socket
Book a DemoInstallSign in
Socket

koatty_payload

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koatty_payload

Payload parser for koatty.

1.4.6
latest
Source
npmnpm
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

koatty_payload

Payload parser middleware for koatty.

使用

Koatty框架默认集成了该中间件,无需引入即可使用。

项目middleware配置 config/middleware.ts:

// src/config/middleware.ts
export default {
  list: [], // 加载的插件列表,执行顺序按照数组元素顺序
  config: { // 插件配置
    "PayloadMiddleware": {
        "extTypes": {
            "json": ['application/json'],
            "form": ['application/x-www-form-urlencoded'],
            "text": ['text/plain'],
            "multipart": ['multipart/form-data'],
            "xml": ['text/xml']
        },
        "limit": '20mb',
        "encoding": 'utf-8',
        "multiples": true,
        "keepExtensions": true
    }
  },
};

Keywords

web

FAQs

Package last updated on 30 Aug 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.