mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-03-20 18:11:03 -04:00
End static directories with / in Pass condition
Otherwise, any URL beginning with static path names go to S3.
This commit is contained in:
parent
19a0ed3f4b
commit
39063ae76c
1 changed files with 2 additions and 2 deletions
|
@ -31,10 +31,10 @@ var extraAppRoutes = [
|
|||
*/
|
||||
var getStaticPaths = function (pathToStatic) {
|
||||
var staticPaths = glob.sync(path.resolve(__dirname, pathToStatic));
|
||||
return staticPaths.map( function (pathName) {
|
||||
return staticPaths.map(function (pathName) {
|
||||
// Reduce absolute path to relative paths like '/js'
|
||||
var base = path.dirname(path.resolve(__dirname, pathToStatic));
|
||||
return '^' + pathName.replace(base, '');
|
||||
return '^' + pathName.replace(base, '') + (path.extname(pathName) ? '' : '/');
|
||||
});
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue