Nestjs 获取cookie
2024-10-13 07:43:34
yarn add cookie-parser
main.ts
import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
import * as cookieParser from 'cookie-parser'
async function bootstrap() {
const app = await NestFactory.create(AppModule);
app.use(cookieParser());
await app.listen(5000);
}
bootstrap();
@Get('json')
json(@Request() req){
l(req.cookies)
}
最新文章
- Ubuntu下git的安装与使用
- webService访问加密-Soapheader
- Django数据库操作
- mysql 中 isnull 和 ifnull 判断字段是否为null
- 使用bootstrap+asp.net mvc4+IBatis.Net实现的小程序
- 低级错误之Oracle客户端添加数据
- 自定义异常以及runtime类
- EF中使用数据库的标量值函数
- Scala学习笔记--枚举
- PNG图片小结
- Vijos 1004 伊甸园日历游戏 博弈
- Project Euler 92:Square digit chains C++
- LSF-SCNN:一种基于 CNN 的短文本表达模型及相似度计算的全新优化模型
- 用Count() >; 0 来判断集合非空的问题
- java读取pdf和MS Office文档
- jquery 下拉列表选择值
- ios 显示代码块(show the code snippet library)
- 搭建自己的 Docker 私有仓库服务
- Http接口系列:如何提高Http接口用例的数据稳定性
- ArcGIS Server10.1之服务新特性(WMTS1.0.0) 【转】
热门文章
- 使用Regsvr32.exe程序注册/注销ActiveX控件
- C#隐藏手机号中间四位为*
- 我的Linux操作系统的发行版是什么?版本号是什么?
- Spring Core Programming(Spring核心编程) - AOP Concepts(AOP基本概念)
- Nginx 反向代理504 Gateway Time-out
- VirtualBox虚拟机磁盘瘦身
- Ubuntu18.04下的模拟神器RetroArch
- Springboot 生成验证码
- Android 蓝牙开发
- 解决CEF中显示Flash动画弹出安全警告问题