mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
feat: Respect root path for static assets and HTML links
* feat: rootpath for static assets and links1 * fix: static asset handler respects root path * fix: use rootPath for links * tests: fix the tests after adding consuctor params * feat: change matchregex instead of stored URLs * feat: baseUrl for handlebar engine and templates * feat: full baseUrl passed to templates * test: fix integration tests + templates * chore: implement requested changes * docs: Describe TemplateEngine interface changes Co-authored-by: Joachim Van Herwegen <joachimvh@gmail.com>
This commit is contained in:
@@ -20,7 +20,7 @@ describe('A StaticAssetHandler', (): void => {
|
||||
'/foo/bar/folder1/': '/assets/folders/1/',
|
||||
'/foo/bar/folder2/': '/assets/folders/2',
|
||||
'/foo/bar/folder2/subfolder/': '/assets/folders/3',
|
||||
});
|
||||
}, 'http://localhost:3000');
|
||||
|
||||
afterEach(jest.clearAllMocks);
|
||||
|
||||
@@ -217,7 +217,7 @@ describe('A StaticAssetHandler', (): void => {
|
||||
jest.spyOn(Date, 'now').mockReturnValue(0);
|
||||
const cachedHandler = new StaticAssetHandler({
|
||||
'/foo/bar/style': '/assets/styles/bar.css',
|
||||
}, {
|
||||
}, 'http://localhost:3000', {
|
||||
expires: 86400,
|
||||
});
|
||||
const request = { method: 'GET', url: '/foo/bar/style' };
|
||||
|
||||
Reference in New Issue
Block a user