Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
k8s-ingress
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
3
Merge Requests
3
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
uplex-varnish
k8s-ingress
Commits
12315f8b
Commit
12315f8b
authored
Jan 11, 2019
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't need to parse header values for leading whitespace.
parent
b0694ca8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
auth.tmpl
pkg/varnish/vcl/auth.tmpl
+1
-1
auth.golden
pkg/varnish/vcl/testdata/auth.golden
+10
-10
No files found.
pkg/varnish/vcl/auth.tmpl
View file @
12315f8b
...
...
@@ -5,7 +5,7 @@ sub vcl_init {
{{- range $auth := .Auths}}
new {{credsMatcher .Realm}} = re2.set(anchor=both);
{{- range $cred := .Credentials}}
{{credsMatcher $auth.Realm}}.add("
\s*
Basic\s+\Q{{$cred}}\E\s*");
{{credsMatcher $auth.Realm}}.add("Basic\s+\Q{{$cred}}\E\s*");
{{- end}}
{{credsMatcher .Realm}}.compile();
{{end -}}
...
...
pkg/varnish/vcl/testdata/auth.golden
View file @
12315f8b
...
...
@@ -3,28 +3,28 @@ import re2;
sub vcl_init {
new vk8s_foo_auth = re2.set(anchor=both);
vk8s_foo_auth.add("
\s*
Basic\s+\QQWxhZGRpbjpvcGVuIHNlc2FtZQ==\E\s*");
vk8s_foo_auth.add("
\s*
Basic\s+\QQWxhZGRpbjpPcGVuU2VzYW1l\E\s*");
vk8s_foo_auth.add("Basic\s+\QQWxhZGRpbjpvcGVuIHNlc2FtZQ==\E\s*");
vk8s_foo_auth.add("Basic\s+\QQWxhZGRpbjpPcGVuU2VzYW1l\E\s*");
vk8s_foo_auth.compile();
new vk8s_bar_auth = re2.set(anchor=both);
vk8s_bar_auth.add("
\s*
Basic\s+\QZm9vOmJhcg==\E\s*");
vk8s_bar_auth.add("
\s*
Basic\s+\QYmF6OnF1dXg=\E\s*");
vk8s_bar_auth.add("Basic\s+\QZm9vOmJhcg==\E\s*");
vk8s_bar_auth.add("Basic\s+\QYmF6OnF1dXg=\E\s*");
vk8s_bar_auth.compile();
new vk8s_baz_auth = re2.set(anchor=both);
vk8s_baz_auth.add("
\s*
Basic\s+\QdXNlcjpwYXNzd29yZDE=\E\s*");
vk8s_baz_auth.add("
\s*
Basic\s+\QbmFtZTpzZWNyZXQ=\E\s*");
vk8s_baz_auth.add("Basic\s+\QdXNlcjpwYXNzd29yZDE=\E\s*");
vk8s_baz_auth.add("Basic\s+\QbmFtZTpzZWNyZXQ=\E\s*");
vk8s_baz_auth.compile();
new vk8s_quux_auth = re2.set(anchor=both);
vk8s_quux_auth.add("
\s*
Basic\s+\QYmVudXR6ZXI6Z2VoZWlt\E\s*");
vk8s_quux_auth.add("
\s*
Basic\s+\QQWxiZXJ0IEFkZGluOm9wZW4gc2V6IG1l\E\s*");
vk8s_quux_auth.add("Basic\s+\QYmVudXR6ZXI6Z2VoZWlt\E\s*");
vk8s_quux_auth.add("Basic\s+\QQWxiZXJ0IEFkZGluOm9wZW4gc2V6IG1l\E\s*");
vk8s_quux_auth.compile();
new vk8s_urlhost_auth = re2.set(anchor=both);
vk8s_urlhost_auth.add("
\s*
Basic\s+\QdXJsOmhvc3Q=\E\s*");
vk8s_urlhost_auth.add("
\s*
Basic\s+\QYWRtaW46c3VwZXJwb3dlcnM=\E\s*");
vk8s_urlhost_auth.add("Basic\s+\QdXJsOmhvc3Q=\E\s*");
vk8s_urlhost_auth.add("Basic\s+\QYWRtaW46c3VwZXJwb3dlcnM=\E\s*");
vk8s_urlhost_auth.compile();
}
...
...
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