Varnish HTTP to HTTPS 넘겨주기

Jmnote (토론 | 기여)님의 2018년 7월 17일 (화) 01:13 판 (새 문서: ==개요== ;Varnish HTTP→HTTPS 넘겨주기 ;Varnish HTTP to HTTPS redirection <source lang='vcl'> sub vcl_recv { if (std.port(local.ip) == 80) { return (synth(...)
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)

1 개요

Varnish HTTP→HTTPS 넘겨주기
Varnish HTTP to HTTPS redirection
sub vcl_recv {
        if (std.port(local.ip) == 80) {
            return (synth(720));
        }
        # ...
}
sub vcl_synth {
    if (resp.status == 720) {
        set resp.http.location = "https://" + req.http.host + req.url;
        set resp.status = 302;
        return (deliver);
    }
}

2 같이 보기

3 참고

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}