Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-devicedetect
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-devicedetect
Commits
97859633
Commit
97859633
authored
Feb 22, 2012
by
Lasse Karstensen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanups for use in production
parent
9fe2fe0a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
INSTALL
INSTALL
+2
-2
example-backend.py
backend/example-backend.py
+1
-1
devicedetect-dev.vcl
devicedetect-dev.vcl
+1
-1
No files found.
INSTALL
View file @
97859633
...
@@ -93,7 +93,7 @@ which is sent to the backend. (and used for cache lookups)
...
@@ -93,7 +93,7 @@ which is sent to the backend. (and used for cache lookups)
Example: enable devicedetection, go to /set_ua_device/mobile-iphone . Afterwards, access your site as usual. You will now
Example: enable devicedetection, go to /set_ua_device/mobile-iphone . Afterwards, access your site as usual. You will now
get the content as if your browser was an iPhone. Watch out for the TTL settings.
get the content as if your browser was an iPhone. Watch out for the TTL settings.
There is an example web server in backend/ that listens on port
8000
and replies
There is an example web server in backend/ that listens on port
5911
and replies
differently depending on X-UA-Device. Run it with:
differently depending on X-UA-Device. Run it with:
cd backend
cd backend
...
@@ -101,7 +101,7 @@ differently depending on X-UA-Device. Run it with:
...
@@ -101,7 +101,7 @@ differently depending on X-UA-Device. Run it with:
Now you can access it through:
Now you can access it through:
http://localhost:
8000
/devicetest/
http://localhost:
5911
/devicetest/
OR
OR
http://localhost:6081/devicetest/ # exchange 6081 for your varnish listening port.
http://localhost:6081/devicetest/ # exchange 6081 for your varnish listening port.
...
...
backend/example-backend.py
View file @
97859633
...
@@ -54,7 +54,7 @@ class requesthandler(BaseHTTPRequestHandler):
...
@@ -54,7 +54,7 @@ class requesthandler(BaseHTTPRequestHandler):
self
.
wfile
.
write
(
TAIL_CONTENT
)
self
.
wfile
.
write
(
TAIL_CONTENT
)
def
main
():
def
main
():
server_address
=
(
''
,
8000
)
server_address
=
(
''
,
5911
)
httpd
=
HTTPServer
(
server_address
,
requesthandler
)
httpd
=
HTTPServer
(
server_address
,
requesthandler
)
httpd
.
serve_forever
()
httpd
.
serve_forever
()
...
...
devicedetect-dev.vcl
View file @
97859633
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
backend devicetest {
backend devicetest {
.host = "127.0.0.1";
.host = "127.0.0.1";
.port = "
8000
";
.port = "
5911
";
}
}
sub vcl_recv {
sub vcl_recv {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment