0
我試圖使用Charles(http://www.charlesproxy.com)爲我在瀏覽器中執行的每個HTTP請求添加標題。我使用的網絡應用程序依靠標題正常工作。我已經建立了重寫規則添加一個標題是這樣的:
將標題添加到Charles的請求
查爾斯錯誤日誌顯示的要求相匹配,並說,這所附加的標題:
2017/05/24 16:34:04 INFO com.xk72.charles.tools.rewrite.RewriteFilter CONNECT https://www.googleapis.com Testing: Add Header: MY_HEADER:MY_HEADER_VALUE
2017/05/24 16:34:04 INFO com.xk72.charles.tools.rewrite.RewriteFilter CONNECT https://www.googleapis.com Matched: Add Header: MY_HEADER:MY_HEADER_VALUE Rewrite: MY_HEADER_VALUE
但是,當我嘗試通過輸入網址,在Chrome中打開相關的網絡應用,當我檢查Chrome開發工具中的流量時,我看不到標題,我的應用無法正常工作。
請注意,Linux上的Chrome需要正確配置才能使用CharlesProxy。請參閱https://stackoverflow.com/questions/32436997/how-configure-charles-proxy-to-work-with-chrome-in-linux-ubuntu-14-04/37858400#37858400 –