File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,11 @@ function createApp (argv = {}) {
4848 rootUrl : argv . serverUri ,
4949 rootPath : path . resolve ( argv . root || process . cwd ( ) ) ,
5050 includeHost : argv . multiuser ,
51- defaultContentType : argv . defaultContentType
51+ defaultContentType : argv . defaultContentType ,
52+ fileSuffixes : {
53+ acl : argv . suffixAcl || '.acl' ,
54+ meta : argv . suffixMeta || '.meta'
55+ }
5256 } )
5357
5458 const configPath = config . initConfigDir ( argv )
Original file line number Diff line number Diff line change @@ -15,7 +15,8 @@ class ResourceMapper {
1515 includeHost = false ,
1616 defaultContentType = 'application/octet-stream' ,
1717 indexFilename = 'index' ,
18- overrideTypes = { acl : 'text/turtle' , meta : 'text/turtle' }
18+ overrideTypes = { acl : 'text/turtle' , meta : 'text/turtle' } ,
19+ fileSuffixes = { acl : '.acl' , meta : '.meta' }
1920 } ) {
2021 this . _rootUrl = this . _removeTrailingSlash ( rootUrl )
2122 this . _rootPath = this . _removeTrailingSlash ( rootPath )
@@ -24,6 +25,7 @@ class ResourceMapper {
2425 this . _defaultContentType = defaultContentType
2526 this . _indexFilename = indexFilename
2627 this . _types = { ...types , ...overrideTypes }
28+ this . _suffixes = fileSuffixes
2729
2830 // If the host needs to be replaced on every call, pre-split the root URL
2931 if ( includeHost ) {
@@ -93,7 +95,7 @@ class ResourceMapper {
9395
9496 // Find a file with the same name (minus the dollar extension)
9597 return ( files . find ( f => this . _removeDollarExtension ( f ) === filename ||
96- ( isIndex && f . startsWith ( this . _indexFilename + '.' ) && ! f . endsWith ( '. acl' ) ) ) )
98+ ( isIndex && f . startsWith ( this . _indexFilename + '.' ) && ! f . endsWith ( this . _suffixes . acl ) ) ) )
9799 }
98100
99101 async getRepresentationUrlForResource ( resourceUrl ) {
You can’t perform that action at this time.
0 commit comments