Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7124571
D4719.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D4719.diff
View Options
diff --git a/site-modules/profile/templates/varnish/vhost.vcl.erb b/site-modules/profile/templates/varnish/vhost.vcl.erb
--- a/site-modules/profile/templates/varnish/vhost.vcl.erb
+++ b/site-modules/profile/templates/varnish/vhost.vcl.erb
@@ -7,9 +7,9 @@
sub vcl_recv {
if (
<% @aliases.each do |alias_| -%>
- req.http.host ~ "^(?i)<%= Regexp.escape(alias_) %>$" ||
+ req.http.host ~ "^(?i)<%= Regexp.escape(alias_) %>(:[0-9]+)?$" ||
<% end -%>
- req.http.host ~ "^(?i)<%= Regexp.escape(@servername) %>$"
+ req.http.host ~ "^(?i)<%= Regexp.escape(@servername) %>(:[0-9]+)?$"
) {
if (std.port(server.ip) == <%= scope['::profile::varnish::http_port'] %>) {
set req.http.x-redir = "https://" + req.http.host + req.url;
@@ -28,9 +28,9 @@
sub vcl_deliver {
if (
<% @aliases.each do |alias_| -%>
- req.http.host ~ "^(?i)<%= Regexp.escape(alias_) %>$" ||
+ req.http.host ~ "^(?i)<%= Regexp.escape(alias_) %>(:[0-9]+)?$" ||
<% end -%>
- req.http.host ~ "^(?i)<%= Regexp.escape(@servername) %>$"
+ req.http.host ~ "^(?i)<%= Regexp.escape(@servername) %>(:[0-9]+)?$"
) {
<% if @hsts_max_age -%>
if (std.port(server.ip) != <%= scope['::profile::varnish::http_port'] %>) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Dec 21 2024, 1:35 PM (11 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3229486
Attached To
D4719: varnish: Correctly handle the vhost when the port number is included
Event Timeline
Log In to Comment