浏览代码

Merge branch 'develop'

xielin 5 年之前
父节点
当前提交
37399fa4c5

+ 1 - 1
.rocketeer/config.php

@@ -7,7 +7,7 @@ return [
     // The name of the application to deploy
     // This will create a folder of the same name in the root directory
     // configured above, so be careful about the characters used
-    'application_name' => 'order-service',
+    'application_name' => 'community-service',
 
     // Plugins
     ////////////////////////////////////////////////////////////////////

+ 1 - 1
.rocketeer/scm.php

@@ -10,7 +10,7 @@ return [
 
     // The SSH/HTTPS address to your repository
     // Example: https://github.com/vendor/website.git
-    'repository' => 'http://caihongxingqiu:Ch20151002@git.caihongxingqiu.net/rainbow/order-service.git',
+    'repository' => 'http://caihongxingqiu:Ch20151002@git.caihongxingqiu.net/rainbow/community-service.git',
 
     // The repository credentials : you can leave those empty
     // if you're using SSH or if your repository is public

+ 9 - 0
app/Http/Middleware/JwtAuthMiddleware.php

@@ -3,6 +3,7 @@
 namespace App\Http\Middleware;
 
 use Closure;
+use Illuminate\Support\Facades\Redis;
 use Tymon\JWTAuth\Exceptions\JWTException;
 use Tymon\JWTAuth\Exceptions\TokenExpiredException;
 use Tymon\JWTAuth\Exceptions\TokenInvalidException;
@@ -30,6 +31,14 @@ class JwtAuthMiddleware
                 return response()->json($error);
             }
             $data = JWTAuth::decode($token)['user'];
+            //检测token是否存在黑名单中
+            if(Redis::zscore('blacklist_token', $token->get())){
+                $error = [
+                    'message' => 'token in blacklist',
+                    'code' => 401,
+                ];
+                return response()->json($error);
+            }
             if ($data->sign !== md5($data->uid . config('customer.jwt_secret'))) {
                 $error = [
                     'message' => 'request is not allow',

+ 1 - 1
deploy/nginx/conf.d/app.beta.conf

@@ -7,7 +7,7 @@ server {
     location ~ \.php$ {
         try_files $uri =404;
         fastcgi_split_path_info ^(.+\.php)(/.+)$;
-        fastcgi_pass app_order_service_beta:9000;
+        fastcgi_pass app_community_service_beta:9000;
         fastcgi_index index.php;
         include fastcgi_params;
         fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

+ 1 - 1
deploy/nginx/conf.d/app.dev.conf

@@ -7,7 +7,7 @@ server {
     location ~ \.php$ {
         try_files $uri =404;
         fastcgi_split_path_info ^(.+\.php)(/.+)$;
-        fastcgi_pass app_order_service_dev:9000;
+        fastcgi_pass app_community_service_dev:9000;
         fastcgi_index index.php;
         include fastcgi_params;
         fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

+ 5 - 5
docker-compose-beta.yml

@@ -1,24 +1,24 @@
 version: '3'
 
 services:
-  app_order_service_beta:
+  app_community_service_beta:
     image: harbor.caihongxingqiu.com:9401/library/php:latest
     tty: true
     working_dir: /var/www
     volumes:
       - ./:/var/www
       - ./deploy/php/local.ini:/usr/local/etc/php/conf.d/local.ini
-      - /data/wwwroot/beta/order-service:/data/wwwroot/beta/order-service
+      - /data/wwwroot/beta/community-service:/data/wwwroot/beta/community-service
     networks:
       - chxq
 
-  server_order_service_beta:
+  server_community_service_beta:
     image: harbor.caihongxingqiu.com:9401/library/nginx:latest
     tty: true
     depends_on:
-      - app_order_service_beta
+      - app_community_service_beta
     ports:
-      - "28213:80"
+      - "28217:80"
     volumes:
       - ./:/var/www
       - ./deploy/nginx/conf.d/app.beta.conf:/etc/nginx/conf.d/app.beta.conf

+ 4 - 4
docker-compose-dev.yml

@@ -1,7 +1,7 @@
 version: '3'
 
 services:
-  app_order_service_dev:
+  app_community_service_dev:
     image: harbor.caihongxingqiu.com:9401/library/php:latest
     tty: true
     working_dir: /var/www
@@ -11,13 +11,13 @@ services:
     networks:
       - chxq
 
-  server_order_service_dev:
+  server_community_service_dev:
     image: harbor.caihongxingqiu.com:9401/library/nginx:latest
     tty: true
     depends_on:
-      - app_order_service_dev
+      - app_community_service_dev
     ports:
-      - "18213:80"
+      - "18217:80"
     volumes:
       - ./:/var/www
       - ./deploy/nginx/conf.d/app.dev.conf:/etc/nginx/conf.d/app.dev.conf