日記帳
本ページはプロモーションが含まれています
カテゴリー
Links
blog(ブログ)マスター
アンドロイドの巣
ゼロから始めるベランダ菜園
タイトル
ラジコン
2024年5月
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31

Apache リバースプロキシ : ブラウザ側 http ⇔ https

カテゴリー: General
2024-04-15 12:39
タイトル

執筆:2024.04.15
編集:2024.04.15


Apache リバースプロキシ

GETできるルール

ブラウザ側 http ⇔ http
ブラウザ側 http ⇔ https
ブラウザ側 https ⇔ https
ブラウザ側 https ⇔ http

POST できないルール

ブラウザ側 http ⇔ https (Cookieにsecure属性ある場合)

理由

ブラウザによるCookie受信拒絶

対応方法

  • secure属性を削除する
    Header edit Set-Cookie "^(.*)(;\s*Secure\s*)(.*)$" "$1$3"

F12: コンソール

非 HTTPS Cookie には “secure”を設定できないため、Cookie は拒否されています。

非 HTTPS Cookie には “secure” を設定できないため、Cookie “_csrf” は拒否されています。


ブラウザ側 http ⇔ https

Listen 127.0.0.2:80
<VirtualHost 127.0.0.2:80>

SSLProxyEngine on
SSLProxyVerify none
SSLProxyCheckPeerCN off
SSLProxyCheckPeerName off
SSLProxyCheckPeerExpire off

ProxyPreserveHost On

ProxyPass / https://abc.test/
ProxyPassReverse / https://abc.test/
#ProxyPassReverseCookieDomain #ProxyPass
Header edit Set-Cookie "^(.*)(;\s*Secure\s*)(.*)$" "$1$3"
</VirtualHost>
ブラウザ側をSSLにする場合は以下を追加
SSLEngine on
SSLCipherSuite
SSLCertificateFile
SSLCertificateKeyFile

ブログ内 関連記事: Apache リバースプロキシ ブラウザ側


ブログ内 関連記事: Apache リバースプロキシ ブラウザ側

トラックバック
トラックバックはありません。
PR

[PR]