Rumah > Soal Jawab > teks badan
Dalam persekitaran, terdapat nginx di bahagian hadapan dan tomcat di bahagian belakang Sekarang kita perlu menyulitkan permintaan SSL daripada pelanggan kepada nginx Memandangkan kesan kelajuan, hanya permintaan dinamik yang disulitkan (iaitu, semua .do
结尾的请求),其它js/png 等文件不加密,为避免https与http混排的问题,jsp也不加密。nginx.conf
Utama. konfigurasi:
server {
listen 80;
server_name localhost;
...
location / {
root /apps/oa/oaapp/OA1;
index index.jsp index.html;
}
location ~ .*\.do$ {
rewrite ^(.*)$ https://ittest.example.com permanent;
}
}
server {
listen 443;
server_name ittest.example.com;
ssl on;
...
location / {
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://localhost:8080/;
}
Sebagai contoh, apabila melawat halaman log masuk login.html sekarang, permintaan nama pengguna dan kata laluan dihantar untuk diproses, saya melihat ubah hala 301 daripada chrome, tetapi kaedah permintaan https baharu menjadi GET, dan maklumat nama pengguna dan kata laluan tidak. perubahan. http dihantar. Bagaimana untuk menyelesaikannya? http://ittest.example.com/member/login.do
,按照上面的规则应该被rewrite到https://ittest.example.com/member/login.do
曾经蜡笔没有小新2017-05-16 17:26:01
301 adalah seperti ini Anda boleh cuba mengkonfigurasi kod status 307 Dalam penyemak imbas moden, ia tidak akan menukar pos kepada get
漂亮男人2017-05-16 17:26:01
[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![] +[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[] +!+[]]+(!![]+[])[+!+[]]]([][(![]+[])[+[]]+([![]]+[ ][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[ +[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[ ])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[ ][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[ +[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[ +!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[] +!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[]) [+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]] ]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[ ]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]] +(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[ ]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[] ]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+ []+[+[]]]+(!![]+[])[+!+[]]()