ಎಲ್ಲಾ ಭಾಷೆಗಳು ಮತ್ತು ಫ್ರೇಮ್ವರ್ಕ್ಗಳು
HAProxy HAProxy config
/pixel.gif ಗೆ ಬರುವ ವಿನಂತಿಗಳಿಗೆ ಖಾಲಿ GIF ನೊಂದಿಗೆ ಉತ್ತರಿಸುವ, HAProxy ಗಾಗಿ ಒಂದು HAProxy config ಸ್ನಿಪೆಟ್; GIF ಅನ್ನು ಆರಂಭದಲ್ಲಿ ಒಮ್ಮೆ ಮಾತ್ರ ಡಿಕೋಡ್ ಮಾಡಲಾಗುತ್ತದೆ.
HAProxy HAProxy config
# Write the file once (it is read into memory at startup):
# printf '%b' '\x47\x49\x46\x38\x39\x61\x01\x00\x01\x00\x80\x00\x00\xff\xff\xff\x00\x00\x00\x21\xf9\x04\x01\x00\x00\x00\x00\x2c\x00\x00\x00\x00\x01\x00\x01\x00\x00\x02\x02\x44\x01\x00\x3b' > /etc/haproxy/pixel.gif
defaults
mode http
timeout connect 5s
timeout client 30s
timeout server 30s
frontend www
bind :8080
http-request return status 200 content-type image/gif file /etc/haproxy/pixel.gif hdr Cache-Control no-store if { path /pixel.gif }
# default_backend app
ನಾವು ಈ ಸ್ನಿಪೆಟ್ ಅನ್ನು ರನ್ ಮಾಡಿ, ಅದು ಹಿಂತಿರುಗಿಸಿದ ಬೈಟ್ಗಳನ್ನು ಹೋಲಿಸಿದ್ದೇವೆ.
ಪರಿಶೀಲಿಸಿ
curl -sI http://localhost:8080/pixel.gif