emptygif
Lingua: Italiano

Tutti i linguaggi e framework

Apache HTTP Server Apache config

Uno snippet Apache config per Apache HTTP Server che risponde alle richieste a /pixel.gif con la GIF vuota, decodificata una sola volta all'avvio.

Apache HTTP Server Apache config

File
pixel.conf
Esegui
apachectl graceful
# 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
# Needs mod_alias, mod_mime and mod_headers.
Alias "/pixel.gif" "/var/www/pixel.gif"

<Location "/pixel.gif">
    Require all granted
    ForceType image/gif
    Header set Cache-Control "no-store"
</Location>

Abbiamo eseguito questo snippet e confrontato i byte che ha restituito.

Verifica

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

Sito ufficiale: Apache HTTP Server