update nginx add gzip

This commit is contained in:
陈景阳
2019-08-02 09:07:42 +08:00
parent 37d9f478ed
commit c4872cbde4
3 changed files with 10 additions and 2 deletions

View File

@@ -6,7 +6,7 @@ mongo:
db: crawlab_test
username: ""
password: ""
auth-source: "admin"
authSource: "admin"
redis:
address: localhost
password: ""

View File

@@ -35,7 +35,7 @@ func InitMongo() error {
var mongoDb = viper.GetString("mongo.db")
var mongoUsername = viper.GetString("mongo.username")
var mongoPassword = viper.GetString("mongo.password")
var mongoAuth = viper.GetString("mongo.auth-source")
var mongoAuth = viper.GetString("mongo.authSource")
if Session == nil {
var uri string

View File

@@ -1,4 +1,12 @@
server {
gzip on;
gzip_min_length 1k;
gzip_buffers 4 16k;
#gzip_http_version 1.0;
gzip_comp_level 2;
gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png;
gzip_vary off;
gzip_disable "MSIE [1-6]\.";
listen 8080;
root /app/dist;
index index.html;