OpenResty 使用sub_filter注入代码

1、编译openresty时需要增加模块 --with-http_sub_module

2、修改nginx配置文件,测试将</head> 替换为 '<script src="http://libs.baidu.com/jquery/2.0.2/jquery.min.js"></script></head>' 

效果如下

 

posted @ 2022-10-08 16:11  缤纷世界  阅读(282)  评论(0编辑  收藏  举报