Home > OS >  Nginx reverse proxy how to modify the js file inside? Not modify <script SRC="/sd. Js"&
Nginx reverse proxy how to modify the js file inside? Not modify <script SRC="/sd. Js"&

Time:10-08

Nginx reverse proxy how to modify the js file inside? Not modify & lt; Script SRC="https://bbs.csdn.net/sd.js" & gt; Connection address, but modify sd. Js the content inside the

Reverse a page of code (display properly)

<meta charset="utf-8" & gt; <body>
<script> Window. PageId='index; </script> <script SRC="https://bbs.csdn.net/sd.js" & gt; </script>

sd. Js content has a connection to
MenuUrl: "https://www.javls.com/18600410326/"

Can point on the page menu, immediately href to sd. The js fixed inside https://www.javls.com/

Is the purpose of reaching the sd. Js content in the modified surface their address, www.aa.com, https://www.javls.com/


Now nginx configuration is

Server {
Listen 443 SSL;
Server_name www.aa.com;
5154 sdferf ssl_certificate. Pem; # certificate, my certificate and nginx. Conf in the same directory
5154 sdferf ssl_certificate_key. Key; # certificate
Ssl_session_timeout 10 m;
Ssl_ciphers ECDHE - RSA - either AES128 - GCM - SHA256: ECDHE: ECDH: AES: HIGH:! NULL:! ANULL:! MD5:! ADH:! RC4.
Ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
Ssl_prefer_server_ciphers on;

The location ^ ~/{
Proxy_set_header Accept - Encoding "";
Proxy_set_header Referer "https://www.javls.com/".
Proxy_pass https://www.javls.com;
Add_header Access - Control - Allow - Origin *;
Sub_filter_types text text/javascript/CSS text/XML application/javascript application/json;
Sub_filter '"//"" HTTP://https://.
Sub_filter 'www.javls.cn' 'www.aa.com'.
Sub_filter_once off;

}
}

Js files inside can't modify the content of the

CodePudding user response:

Top by oneself

CodePudding user response:

Still not solved, have done?