logo
publist
写文章

简介

该用户还未填写简介

擅长的技术栈

可提供的服务

暂无可提供的服务

nginx 请求头host转发规则

默认值,固定使用虚拟主机域名proxy_set_header Host $proxy_host;例如,以下情况host=server1···proxy_pass http://server1/;···不修改hostproxy_set_header Host $host;请求包含“Host”请求头时为“Host”字段的值,在请求未携带“Host”请求头时为虚拟主机域名不传递ho...

#nginx
fastjson反序列化指定泛型参数

public <V> List toList(Class<V> valueClass){return JSON.parseObject(json, new TypeReference<List<V>>(valueClass) {});}

#java#开发语言#后端
springsecurity 多httpsecurity配置

多配置时根据配置文件order依次套用httpsecurity规则,等效于http.and()http.authorizeRequests()标识标识多个匹配条件入口http.authorizeRequests()….anyRequest()标识全部路径适用规则此规则之后的规则将不会生效正确的做法:配置A// a下路径http.antMatcher("/a/**").author...

#spring
nginx 配置http自动跳转https

server {listen 80;rewrite ^(.*)$ https://$host$1 permanent;}

#nginx
使用nginx反代nacos报错 badrequest 400

location配置下增加proxy_set_header Host $http_host;

nginx 反向代理端口号丢失处理

使用nginx反向代理时,非80端口的server重定向产生丢失端口号的异常增加配置在HOST HEADER中转发端口号server {...proxy_set_header Host $host:$server_port;...}

nginx 为chrome客户端请求加SameSite=None;Secure

http {map $http_user_agent $samesite_attr {"~*chrome"';Secure;SameSite=None';}server {location / {...proxy_cookie_path ~/(.*) "/$1$samesite_attr";}}}

#nginx
nginx docker官方镜像使用自定义启动命令启动失败

官方参考资料默认启动命令nginx -g daemon off;If you add a custom CMD in the Dockerfile, be sure to include -g daemon off; in the CMD in order for nginx to stay in the foreground, so that Docker can track the proce

#docker
docker容器与宿主机同步时间

只读挂载宿主机localtime文件即可-v /etc/localtime:/etc/localtime:ro

#docker
    共 17 条
  • 1
  • 2
  • 请选择