作者 Your Name

update

@@ -50,3 +50,8 @@ PUSHER_APP_CLUSTER=mt1 @@ -50,3 +50,8 @@ PUSHER_APP_CLUSTER=mt1
50 50
51 MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" 51 MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
52 MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" 52 MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
  53 +
  54 +API_URL=https://sitefile.globalso.com/
  55 +TRANSMIT_URL=https://hub.globalso.com/
  56 +MERCHANT_NUMBER=
  57 +SECRET_TOKEN=
  1 +/node_modules
  2 +/public/hot
  3 +/public/storage
  4 +/public/.htaccess
  5 +/public/nginx.htaccess
  6 +/storage/*.key
  7 +/public
  8 +/vendor
  9 +.env
  10 +.env.backup
  11 +.phpunit.result.cache
  12 +docker-compose.override.yml
  13 +Homestead.json
  14 +Homestead.yaml
  15 +npm-debug.log
  16 +yarn-error.log
  17 +/.idea
  18 +/.vscode
  19 +composer.lock
  20 +!/public/wp-admin/admin-ajax.php
  21 +app/Console/Commands/Test.php
@@ -116,7 +116,8 @@ function httpPost($url, $data, $header = [],$is_json = true) @@ -116,7 +116,8 @@ function httpPost($url, $data, $header = [],$is_json = true)
116 $header = array( 116 $header = array(
117 "Accept: application/json", 117 "Accept: application/json",
118 "Content-Type:application/json;charset=utf-8", 118 "Content-Type:application/json;charset=utf-8",
119 - "Token:".env("WEB_SITE_TOKEN") 119 + "token:".env("SECRET_TOKEN"),
  120 + "pid:".env("MERCHANT_NUMBER")
120 ); 121 );
121 } 122 }
122 $ch = curl_init(); 123 $ch = curl_init();
@@ -197,9 +198,10 @@ public function uploadAmpVerifyFile(Request $request) @@ -197,9 +198,10 @@ public function uploadAmpVerifyFile(Request $request)
197 */ 198 */
198 public function websiteHtml(Request $request){ 199 public function websiteHtml(Request $request){
199 $domain = $request->getHost(); 200 $domain = $request->getHost();
200 - $token = env("WEB_SITE_TOKEN"); 201 + $token = env("SECRET_TOKEN");
  202 + $pid = env("MERCHANT_NUMBER");
201 $apiUrl = env("API_URL"); 203 $apiUrl = env("API_URL");
202 - $requestUrl = $apiUrl."api/get_url_verify_token/?domain=".$domain."&token=".$token; 204 + $requestUrl = $apiUrl."api/get_url_verify_token/?pid=".$pid."&token=".$token."&domain=".$domain;
203 @file_put_contents(storage_path('logs/notify_get_url.log'), date('Y-m-d H:i:s') . "接收到通知:". $requestUrl . PHP_EOL, FILE_APPEND); 205 @file_put_contents(storage_path('logs/notify_get_url.log'), date('Y-m-d H:i:s') . "接收到通知:". $requestUrl . PHP_EOL, FILE_APPEND);
204 206
205 try { 207 try {
@@ -239,6 +241,9 @@ public function websiteHtmlHandle($url,$domain) @@ -239,6 +241,9 @@ public function websiteHtmlHandle($url,$domain)
239 $zip->extractTo($outputFolder); 241 $zip->extractTo($outputFolder);
240 $zip->close(); 242 $zip->close();
241 $this->deleteDirectory($targetFile); 243 $this->deleteDirectory($targetFile);
  244 +
  245 + $transmitUrl = env("TRANSMIT_URL");
  246 + $this->httpPost($transmitUrl."api/selfSiteNotify/",json_encode(['domain'=>$domain]));
242 } else { 247 } else {
243 return $this->error('解压失败!'); 248 return $this->error('解压失败!');
244 // 处理打开压缩文件失败的情况 249 // 处理打开压缩文件失败的情况
  1 +compiled.php
  2 +config.php
  3 +down
  4 +events.scanned.php
  5 +maintenance.php
  6 +routes.php
  7 +routes.scanned.php
  8 +schedule-*
  9 +services.json