第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

python-flask 框架中的url_for

python-flask 框架中的url_for

收到一只叮咚 2018-08-06 07:10:29
comments = []@app.route("/", methods=["GET", "POST"])def index():    if request.method == "GET":      return render_template("index.html", comments=comments)    #如果是post:    comments.append(request.form["contents"])    return redirect(url_for('index'))場(chǎng)景還原:我的服務(wù)器沒開80端口,我用nginxlisten 81端口。利用flask框架(上述代碼)遇到url_for('index')定向到 xxx.cn??墒俏倚枰ㄏ虻?xxx.cn:81,那么應(yīng)該怎么寫?(手動(dòng)訪問xxx.cn:81都是可以的。)我的Nginx配置server {         listen 81;         server_name 11.11.11.11;          location / {                         proxy_pass http://127.0.0.1:5000; # 這里是指向 gunicorn host 的服務(wù)地址            proxy_set_header Host $host;             proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;         }        }
查看完整描述

1 回答

  • 1 回答
  • 0 關(guān)注
  • 1598 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)