emptygif
Dil: Türkçe

Tüm diller ve framework'ler

nginx (empty_gif) nginx

nginx (empty_gif) için, /pixel.gif isteklerine başlangıçta bir kez çözülen boş GIF ile yanıt veren bir nginx örneği.

nginx (empty_gif) nginx

Dosya
pixel.conf
Çalıştır
nginx -s reload
# ngx_http_empty_gif_module ships with standard nginx builds. empty_gif always
# serves nginx's own built-in 43-byte transparent 1x1 GIF; its bytes can't be
# changed (to serve your own GIF, use the static-file or njs variants).
server {
    listen 8080;

    location = /pixel.gif {
        empty_gif;
        add_header Cache-Control "no-store";
    }
}

Bu örneği çalıştırıp döndürdüğü baytları karşılaştırdık.

Kontrol et

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

Resmî site: nginx (empty_gif)

nginx için daha fazlası