emptygif
भाषा: हिन्दी

सभी भाषाएँ और फ़्रेमवर्क

nginx (static file) nginx

nginx (static file) के लिए nginx स्निपेट, जो /pixel.gif पर आने वाली रिक्वेस्ट का जवाब empty GIF से देता है। GIF स्टार्टअप पर एक ही बार डिकोड होता है।

nginx (static file) nginx

फ़ाइल
pixel.conf
चलाएँ
nginx -s reload
# Write the file once:  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' > /var/www/pixel.gif
server {
    listen 8080;

    location = /pixel.gif {
        alias /var/www/pixel.gif;
        types { }
        default_type image/gif;
        add_header Cache-Control "no-store";
    }
}

हमने यह स्निपेट चलाया और इसके लौटाए बाइट्स की तुलना की।

जाँचें

curl -sI http://localhost:8080/pixel.gif

आधिकारिक साइट: nginx (static file)

nginx में और