Unverified Commit df183ee9 authored by Ray Schamp's avatar Ray Schamp Committed by GitHub

Merge pull request #6063 from rschamp/ignore-querystrings

Ignore querystrings when matching routes
parents 76e2625c a13e6947
...@@ -95,7 +95,7 @@ async.auto({ ...@@ -95,7 +95,7 @@ async.auto({
async.forEachOf(routes, function (route, id, cb2) { async.forEachOf(routes, function (route, id, cb2) {
var condition = { var condition = {
name: fastlyConfig.getConditionNameForRoute(route, 'request'), name: fastlyConfig.getConditionNameForRoute(route, 'request'),
statement: 'req.url ~ "' + route.pattern + '"', statement: 'req.url.path ~ "' + route.pattern + '"',
type: 'REQUEST', type: 'REQUEST',
// Priority needs to be > 1 to not interact with http->https redirect // Priority needs to be > 1 to not interact with http->https redirect
priority: 10 + id priority: 10 + id
...@@ -118,7 +118,7 @@ async.auto({ ...@@ -118,7 +118,7 @@ async.auto({
responseCondition: function (cb3) { responseCondition: function (cb3) {
var condition = { var condition = {
name: fastlyConfig.getConditionNameForRoute(route, 'response'), name: fastlyConfig.getConditionNameForRoute(route, 'response'),
statement: 'req.url ~ "' + route.pattern + '"', statement: 'req.url.path ~ "' + route.pattern + '"',
type: 'RESPONSE', type: 'RESPONSE',
priority: id priority: id
}; };
...@@ -223,7 +223,7 @@ async.auto({ ...@@ -223,7 +223,7 @@ async.auto({
requestCondition: function (cb2) { requestCondition: function (cb2) {
var condition = { var condition = {
name: 'routes/projects/embed (request)', name: 'routes/projects/embed (request)',
statement: 'req.url ~ "^/projects/embed/(\\d+)"', statement: 'req.url.path ~ "^/projects/embed/(\\d+)"',
type: 'REQUEST', type: 'REQUEST',
priority: 10 priority: 10
}; };
...@@ -232,7 +232,7 @@ async.auto({ ...@@ -232,7 +232,7 @@ async.auto({
responseCondition: function (cb2) { responseCondition: function (cb2) {
var condition = { var condition = {
name: 'routes/projects/embed (response)', name: 'routes/projects/embed (response)',
statement: 'req.url ~ "^/projects/embed/(\\d+)"', statement: 'req.url.path ~ "^/projects/embed/(\\d+)"',
type: 'RESPONSE', type: 'RESPONSE',
priority: 10 priority: 10
}; };
......
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