nginx (empty_gif) nginx
nginx (empty_gif) માટે nginx સ્નિપેટ, જે /pixel.gif પરની રિક્વેસ્ટનો જવાબ empty GIF થી આપે છે. GIF સ્ટાર્ટઅપ વખતે એક જ વાર ડિકોડ થાય છે.
nginx (empty_gif) nginx
# 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";
}
}
અમે આ સ્નિપેટ ચલાવ્યો અને તેણે પરત કરેલા બાઇટની સરખામણી કરી.
ચકાસો
curl -sI http://localhost:8080/pixel.gif
સત્તાવાર સાઇટ: nginx (empty_gif)