2017-09-25 99 views
0

需要關於Google雲平臺上的域驗證問題的幫助。我正在嘗試使用HTML標記方法驗證我的appspot.com網址。我的HTML包含:谷歌雲平臺上的域驗證問題

<html> 
<head> 
<meta name="google-site-verification" content="39k6VaTYfQcrqMGTZ1LDYXxlR4T0gtGeOTce68idUE0" /> 
<title> This is title </title> 
</head> 
<body> 
Hello world 
</body> 
</html> 

我已經將其命名爲index.html,然後在main.py如下使用這個HTML文件:網址https://financelcr.appspot.com/只是打印後「gcloud應用程序部署」

import logging 
from flask import Flask,render_template 
from flask import request 
import os 
import requests 
app = Flask(__name__) 

MESSAGES = [] 

@app.route('/pubsub/push', methods=['POST']) 
def pubsub_push(): 
    if (request.args.get('token', '') != 
      current_app.config['PUBSUB_VERIFICATION_TOKEN']): 
     return 'Invalid request', 400 

    envelope = json.loads(request.data.decode('utf-8')) 
    payload = base64.b64decode(envelope['message']['data']) 

    MESSAGES.append(payload) 

    # Returning any 2xx status indicates successful receipt of the message. 
    return 'OK', 200 


@app.route('/', methods=['GET', 'POST']) 
def index(): 
    if request.method == 'GET': 
     return render_template('index.html', messages=MESSAGES) 

    data = request.form.get('payload', 'Example payload').encode('utf-8') 

    publisher = pubsub_v1.PublisherClient() 
    topic_path = publisher.topic_path(
     current_app.config['PROJECT'], 
     current_app.config['PUBSUB_TOPIC']) 

    publisher.publish(topic_path, data=data) 

    return 'OK', 200 

你好世界和驗證失敗的消息:

Verification failed for https://financelcr.appspot.com/ using the Meta tag method (less than a minute ago). Your meta tag is not in the <head> section of your home page. 
Verify your ownership of https://financelcr.appspot.com/. Learn more. 

請幫助如何解決問題。試圖在Google雲端存儲上設置對象更改通知,並且無法運行「gsutil notification watchbucket https://financelcr.appspot.com/ .....」,直到域驗證通過。任何幫助都感激不盡。

回答