mirror of
https://github.com/billz/raspap-webgui.git
synced 2023-10-10 13:37:24 +02:00
add etag header to wifi qr code to improve
browser caching behavior
This commit is contained in:
parent
ad1ca08de3
commit
806ce22970
@ -40,11 +40,13 @@ $svg = shell_exec($command);
|
|||||||
|
|
||||||
$config_mtime = filemtime(RASPI_HOSTAPD_CONFIG);
|
$config_mtime = filemtime(RASPI_HOSTAPD_CONFIG);
|
||||||
$last_modified = gmdate('D, d M Y H:i:s ', $config_mtime) . 'GMT';
|
$last_modified = gmdate('D, d M Y H:i:s ', $config_mtime) . 'GMT';
|
||||||
|
$etag = hash('sha256', $data);
|
||||||
$content_length = strlen($svg);
|
$content_length = strlen($svg);
|
||||||
|
|
||||||
header("Content-Type: image/svg+xml");
|
header("Content-Type: image/svg+xml");
|
||||||
header("Content-Length: $content_length");
|
header("Content-Length: $content_length");
|
||||||
header("Last-Modified: $last_modified");
|
header("Last-Modified: $last_modified");
|
||||||
|
header("ETag: \"$etag\"");
|
||||||
header("X-QR-Code-Content: $data");
|
header("X-QR-Code-Content: $data");
|
||||||
echo shell_exec($command);
|
echo shell_exec($command);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user