Commit graph

70 commits

Author SHA1 Message Date
Colby Gutierrez-Kraybill
b919d058b6 derp. 2024-05-21 01:00:50 -04:00
Colby Gutierrez-Kraybill
82cc1162c1 Make redirect updating more verbose 2024-05-21 00:31:38 -04:00
Colby Gutierrez-Kraybill
1934f19338 fix up for linting reasons... 2024-05-20 23:12:17 -04:00
Colby Gutierrez-Kraybill
099235e6d9 Provide mechanism to specify a RADISH_URL that differentiates between different destination end points depending on if running from staging or from production or ... 2024-05-20 22:41:44 -04:00
Christopher Willis-Ford
c2fa2fedd5 style: enable scratch/es6 lint rules 2024-01-18 09:20:10 -08:00
rschamp
a13e6947b7 Ignore querystrings when matching routes
This should eliminate the issue where querystrings would cause URLs to skip S3 and fall back to scratchr2
2021-09-15 15:25:30 -04:00
Ben Wheeler
37a5dd9365 use hyphen instead of underscore 2021-05-14 19:17:22 -04:00
Ben Wheeler
c8445561b3 set, purge static_assets surrogate key on deploy 2021-05-14 18:44:21 -04:00
Ben Wheeler
de5e712305 when looking for latest fastly VCL to clone, use only active VCLs 2019-09-19 14:27:42 -04:00
Paul Kaplan
5ac67cc033 Revert "Merge pull request #3217 from LLK/hotfix/fastly-concurrency"
This reverts commit fecf3a81d7, reversing
changes made to 76473c97fe.
2019-08-07 14:03:48 -04:00
rschamp
21dccf60fe Rename and make concurrency limit configurable 2019-08-05 15:58:17 -04:00
rschamp
802c6bff22 Add concurrency limits to async requests of 2019-08-05 15:33:46 -04:00
rschamp
5e79449334 Add concurrency limits to async requests 2019-08-05 15:09:36 -04:00
Ray Schamp
03e6a49b44 Update for async v2
async.auto / async.waterfall now take the callback as the last argument in functions with dependencies.

Async is modularized so eachLimit can be required specifically
2019-07-12 11:44:52 -04:00
chrisgarrity
94a8396713 Make list of languages on www consistent with gui
start to depend on `scratch-l10n`

So far only the supported locales is used.

There is one small difference between scratch-l10n and the `languages.json` that was removed.
languages was:
`{locale: ‘languagename’, …}` key value pairs.

l10n exports:
`{locale: {name: ‘languagename’},…}

That required an additional change to the language chooser.
2018-12-13 16:00:41 -05:00
chrisgarrity
1a1122d984 show embed view
* detect `embed` in the URL
* initialize GUI in embed mode if detected
* match `embed` in the project page route
* add fastly config rules to redirect `/projects/embed/:id` to `/projects/:id/embed`
2018-12-05 17:35:44 -05:00
chrisgarrity
84884bebf2 Revised ?tip_bar= fastly rules
Added missing request condition
2018-12-05 14:57:30 -05:00
Paul Kaplan
214b81cf6d
Revert "Add tip_bar fastly config" 2018-12-05 11:42:30 -05:00
chrisgarrity
39a3af8732 Add tip_bar fastly config
Add another section to the fastly config that will permanently redirect any URL with `tip_bar=` to a matching `tutorial=`
2018-12-03 09:47:26 -05:00
chrisgarrity
6df58e41fd Correct preview route for fastly
- use more explicit route
- handle fastly error in the callback correctly
- more succinct parsing of the URL path
2018-05-02 17:04:14 -04:00
Ray Schamp
590f505a61 Revert "Merge pull request #1788 from LLK/revert-1775-hotfix/es6-upgrade"
This reverts commit 1b1b396e92, reversing
changes made to a144bab0e6.
2018-01-30 11:53:12 -05:00
Ray Schamp
46511e1253
Revert "[Develop] Upgrade to ES6" 2018-01-30 09:54:45 -05:00
Matthew Taylor
6d1f2fbccd initial es6 commit 2018-01-19 14:06:26 -05:00
Colby Gutierrez-Kraybill
cd27b68cd1
Merge pull request #1720 from LLK/hotfix/cache-nav-session-endpoints
[Develop] Hotfix/cache nav session endpoints
2017-12-01 16:01:19 -05:00
Ray Schamp
51d980cfb3 Conditionally purge on deploys
We can configure this within Travis
2017-12-01 15:34:31 -05:00
Colby Gutierrez-Kraybill
0ba2693c0e Cache logged out account-nav.json and session
Cache ^/fragment/account-nav.json and ^/session for logged out users
2017-12-01 13:50:43 -05:00
Colby Gutierrez-Kraybill
1083a7a79f Fix typos and correct cookie
scratchsessionsid not scratchsessionid
Cookie needs key added for assigned value of scratchlanguage
2017-12-01 10:18:47 -05:00
Colby Gutierrez-Kraybill
91b3feb0b1 Merge pull request #1708 from colbygk/session-caching
[Master] Project page caching
2017-12-01 09:59:26 -05:00
Colby Gutierrez-Kraybill
69757e6bec
Revert "[Master] Project page caching" 2017-12-01 09:24:17 -05:00
Colby Gutierrez-Kraybill
0c109113c7 Failed on actual run, needs to load languages from directory below 2017-11-30 15:01:08 -05:00
Colby Gutierrez-Kraybill
785667691e Fix up lint errors 2017-11-30 11:30:45 -05:00
Colby Gutierrez-Kraybill
279e25eb69 Simplify how the conditional is created for setting the S3 backend, caching related behavior for non-logged in users and maintaining language settings and passing to backend 2017-11-30 11:11:38 -05:00
Matthew Taylor
ff0c5eaa05 remove unused variable 2017-04-26 08:40:58 -04:00
Matthew Taylor
905fe8ac10 Remove setBucketNameHeader
Missed this one – it’s now covered in the custom vcl
2017-04-26 08:35:15 -04:00
Matthew Taylor
d563535ba5 Move string set methods out of fastly-extended
This also moves all helper methods in `configure-fastly` into a separate utility file, and adds some additional unit tests for those utilities now that they are separated.
2017-04-25 13:18:13 -04:00
Matthew Taylor
ca067fdc5e Use custom VCL for Pass/!Pass conditions
We’ve now exceeded our max number of characters for a condition in the Fastly API, and we need to make it larger to accommodate regex conditionals that can match on any of the routes in www currently.

This fixes the issue by moving the conditions – and the states that are affected by it, like setting the backend or cache ttls – to two custom vcl files that are updated via the Fastly API. One is for the `vcl_rev` config, and one is for the `vcl_fetch` config.
2017-04-25 11:06:57 -04:00
Ray Schamp
7ae7db76a2 Fix typo 2016-07-22 12:45:18 -04:00
Ray Schamp
62609cbc87 Collapse by beginning all routes with a common ^ 2016-07-22 12:38:24 -04:00
Ray Schamp
e5ad1872d0 Don't require end slashes when replacing arguments 2016-07-22 11:47:26 -04:00
Matthew Taylor
6e67e3973c Revert "Attempt 2 – reprioritize header conditionals"
This reverts commit 1ee9358be4.
2016-07-08 10:31:17 -04:00
Matthew Taylor
1ee9358be4 Attempt 2 – reprioritize header conditionals 2016-07-08 10:18:02 -04:00
Matthew Taylor
dfc4f9574d use route aliases for generalizable route patterns
1. match all `^/explore` to www
2. match all `^/search` to www
3. match all `^/conference` to www
2016-06-14 11:28:20 -04:00
Ray Schamp
e323cbbb9f Terminate view.html rewrite rule
Otherwise anything with html in the path matches. Fixes #527
2016-05-31 09:38:13 -04:00
Ray Schamp
19758f3901 Merge pull request #521 from rschamp/bugfix/cache-condition
[Release] Fix cache condition request
2016-05-27 14:10:33 -04:00
Ray Schamp
ca97838695 Fix cache condition request
The response from the request condition includes fields we don't want to send up with the cache condition
2016-05-27 13:50:13 -04:00
Ray Schamp
8ded5cb267 Always use regex form of route patterns
When talking to Fastly, don't ever use an express-style url pattern for consistency, and so we don't use : characters in condition names.
2016-05-20 10:33:13 -04:00
Matthew Taylor
d69de477a1 Merge branch 'develop' of https://github.com/LLK/scratch-www into feature/conference-schedule
* 'develop' of https://github.com/LLK/scratch-www: (32 commits)
  Lint
  Bundle all locale data
  Don't bundle polyfills
  Set up Raven within init.js
  Prefix privacyPolicy message string
  Exclude minified javascript from linting
  One space more
  Changes "interfacesto" to "interfaces to"
  Remove tag target
  Filter before mapping to avoid returning undefined
  Fix Pass condition for "static" routes
  Spacing2
  Mangling is the default
  Spacing
  Update for typography fixes
  Cherry pick PR #476 into master
  Add invisible spacer to anchored sections
  For Developers
  Lint JSON, expand and simplify lint step
  Fix banned user redirect
  ...

# Conflicts:
#	src/redux/actions.js
#	src/redux/reducer.js
2016-05-19 13:25:36 -04:00
Matthew Taylor
1e57262771 Add fastly rule for express uri patterns
convert path variables in express (i.e. dev-server) into rules that work for fastly (i.e. `.+?`). I tried to make it `\w+?`, but javascript seemed to either want no `\`'s or two `\`'s
2016-05-19 11:36:03 -04:00
Ray Schamp
ca546552b9 Filter before mapping to avoid returning undefined
If the map function doesn't return anything, the added item is undefined. Avoid this by filtering the array before mapping.
2016-05-17 13:49:03 -04:00
Ray Schamp
bb70629b6b Fix Pass condition for "static" routes
Previously we relied on the static directory to construct the pass condition, but this doesn't include many things added to the build other than static files. So instead of adding these explicitly through `extraAppRoutes`, base the Pass condition on the final build, but exclude the view .html files. This way the version.txt, routes.json, and all directories added by webpack will be resolved to S3 rather than scratchr2.
2016-05-17 12:20:45 -04:00