Browse Source

update: new url format for google earth, turn on the gzip support of nginx

master
Dnomd343 4 years ago
parent
commit
2661d3121a
  1. 18
      README.md
  2. 2
      assets/js/main.js
  3. 2
      assets/js/main.min.js
  4. 9
      conf/nginx/ip.conf

18
README.md

@ -96,6 +96,15 @@ server {
server_name ip.343.re; # 改为自己的域名
ssl_certificate /etc/ssl/certs/343.re/fullchain.pem; # 改为自己的证书
ssl_certificate_key /etc/ssl/certs/343.re/privkey.pem;
gzip on;
gzip_buffers 32 4K;
gzip_comp_level 6;
gzip_min_length 100;
gzip_types application/javascript text/css text/xml;
gzip_disable "MSIE [1-6]\.";
gzip_vary on;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://127.0.0.1:1601;
@ -191,6 +200,15 @@ server {
server_name ip.343.re; # 改为自己的域名
ssl_certificate /etc/ssl/certs/343.re/fullchain.pem; # 改为自己的证书
ssl_certificate_key /etc/ssl/certs/343.re/privkey.pem;
gzip on;
gzip_buffers 32 4K;
gzip_comp_level 6;
gzip_min_length 100;
gzip_types application/javascript text/css text/xml;
gzip_disable "MSIE [1-6]\.";
gzip_vary on;
location / {
proxy_set_header X-Real-IP $proxy_protocol_addr;
proxy_pass http://127.0.0.1:1601;

2
assets/js/main.js

@ -194,7 +194,7 @@ function getInfo() {
$("#loc").text("Unknow");
clear();
} else {
var earthUri = "https://earth.google.com/web/@" + data.loc + ",0a,398836d,1y,0h,0t,0r";
var earthUri = "https://earth.google.com/web/@" + data.loc + ",9.963a,7999.357d,35y,-34.3h,45t,0r/data=KAI";
$("#loc").html('<a href="' + earthUri + '" target="_blank" title="View on Google Earth">' + data.loc + '</a>');
draw(parseFloat(data.loc.split(',')[0]), parseFloat(data.loc.split(',')[1]));
}

2
assets/js/main.min.js

File diff suppressed because one or more lines are too long

9
conf/nginx/ip.conf

@ -17,6 +17,15 @@ server {
server_name ip.343.re; # 改为自己的域名
ssl_certificate /etc/ssl/certs/343.re/fullchain.pem; # 改为自己的证书
ssl_certificate_key /etc/ssl/certs/343.re/privkey.pem;
gzip on;
gzip_buffers 32 4K;
gzip_comp_level 6;
gzip_min_length 100;
gzip_types application/javascript text/css text/xml;
gzip_disable "MSIE [1-6]\.";
gzip_vary on;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://127.0.0.1:1601;

Loading…
Cancel
Save