Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
scratch-www
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
scratch-www
Commits
cd27b68c
Unverified
Commit
cd27b68c
authored
Dec 01, 2017
by
Colby Gutierrez-Kraybill
Committed by
GitHub
Dec 01, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1720 from LLK/hotfix/cache-nav-session-endpoints
[Develop] Hotfix/cache nav session endpoints
parents
7432c20f
0ba2693c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
3 deletions
+6
-3
bin/configure-fastly.js
bin/configure-fastly.js
+2
-1
bin/lib/fastly-config-methods.js
bin/lib/fastly-config-methods.js
+2
-1
test/unit/test_fastly_config_methods.js
test/unit/test_fastly_config_methods.js
+2
-1
No files found.
bin/configure-fastly.js
View file @
cd27b68c
...
...
@@ -67,7 +67,8 @@ async.auto({
'
std.tolower(req.http.Accept-Language)
'
+
'
);
\n
'
+
'
}
\n
'
+
'
if (req.url ~ "^/projects/" && !req.http.Cookie:scratchsessionsid) {
\n
'
+
'
if (req.url ~ "^(/projects/|/fragment/account-nav.json|/session/)" &&
'
+
'
!req.http.Cookie:scratchsessionsid) {
\n
'
+
'
set req.http.Cookie = "scratchlanguage=" req.http.Cookie:scratchlanguage;
\n
'
+
'
} else {
\n
'
+
'
return(pass);
\n
'
+
...
...
bin/lib/fastly-config-methods.js
View file @
cd27b68c
...
...
@@ -93,7 +93,8 @@ var FastlyConfigMethods = {
setResponseTTL
:
function
(
condition
)
{
return
''
+
'
if (
'
+
condition
+
'
) {
\n
'
+
'
if (req.url ~ "^/projects/" && !req.http.Cookie:scratchsessionsid) {
\n
'
+
'
if (req.url ~ "^(/projects/|/fragment/account-nav.json|/session/)" &&
'
+
'
!req.http.Cookie:scratchsessionsid) {
\n
'
+
'
set beresp.http.Vary = "Accept-Encoding, Accept-Language";
\n
'
+
'
unset beresp.http.set-cookie;
\n
'
+
'
return(deliver);
\n
'
+
...
...
test/unit/test_fastly_config_methods.js
View file @
cd27b68c
...
...
@@ -63,7 +63,8 @@ tap.test('testSetTTL', function (t) {
var
ttl
=
fastlyConfig
.
setResponseTTL
(
'
itsactuallyttyl
'
);
t
.
equal
(
ttl
,
''
+
'
if (itsactuallyttyl) {
\n
'
+
'
if (req.url ~ "^/projects/" && !req.http.Cookie:scratchsessionsid) {
\n
'
+
'
if (req.url ~ "^(/projects/|/fragment/account-nav.json|/session/)" &&
'
+
'
!req.http.Cookie:scratchsessionsid) {
\n
'
+
'
set beresp.http.Vary = "Accept-Encoding, Accept-Language";
\n
'
+
'
unset beresp.http.set-cookie;
\n
'
+
'
return(deliver);
\n
'
+
...
...
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