Commit 8c9f5181 authored by Lasse Karstensen's avatar Lasse Karstensen

cleanup

parent 0d0b9330
...@@ -8,13 +8,13 @@ include "devicedetect.vcl"; ...@@ -8,13 +8,13 @@ include "devicedetect.vcl";
sub vcl_recv { sub vcl_recv {
# only do device detection on non-static content. # only do device detection on non-static content.
if (!req.url ~ "^/[^?]+\.(jpeg|jpg|png|gif|ico|js|css|txt|gz|zip|lzma|bz2|tgz|tbz|html|htm)(\?.*|)$") { if (!req.url ~ "^/[^?]+\.(jpeg|jpg|png|gif|ico|js|css|txt|gz|zip|lzma|bz2|tgz|tbz|html|htm)(\?.*|)$") {
detectdevice; call detectdevice;
} }
} }
sub vcl_hash { sub vcl_hash {
# add the device classification to the hash, so clients get the correct cached object # add the device classification to the hash, so clients get the correct cached object
if (req.http.X-hash-input) set req.hash += req.http.X-hash-input; if (req.http.X-hash-input) { hash_data(req.http.X-hash-input); }
} }
""" """
......
...@@ -8,7 +8,7 @@ from pprint import pformat ...@@ -8,7 +8,7 @@ from pprint import pformat
import datetime import datetime
HEAD_CONTENT="""<html><body><h1>Device Detection test backend</h1> HEAD_CONTENT="""<html><body><h1>Device Detection test backend</h1>
<p>This is a test backend/web server for device detection. It will tell you what kind of device your client is recognized as, if set. By default it will just give you the contents of the X-UA-Device header, if set.</p> <p>This is a test backend/web server for device detection. It will tell you what kind of device your client is recognized as by Varnish, typically by outputting the contents of the X-UA-Device header.</p>
<p>All content is in /devicetest/, and the backend will redirect you if you access /.</p> <p>All content is in /devicetest/, and the backend will redirect you if you access /.</p>
""" """
TAIL_CONTENT=""" TAIL_CONTENT="""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment