Mercurial > urweb
changeset 2139:8c81cd351c1a
Allow URIs specified in file directives implicitly
It seems to me that, by specifying that one wants to serve a given
file at a specified URI, one is implying that this URI should be
allowed.
author | Julian Squires <julian@cipht.net> |
---|---|
date | Fri, 24 Apr 2015 16:21:55 -0400 |
parents | 3ca67d73fa5d |
children | 2b0f6b7ebf4f |
files | src/compiler.sml |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/compiler.sml Mon May 04 13:22:29 2015 -0400 +++ b/src/compiler.sml Fri Apr 24 16:21:55 2015 -0400 @@ -875,7 +875,8 @@ (case String.fields Char.isSpace arg of [uri, fname] => (Settings.setFilePath thisPath; Settings.addFile {Uri = uri, - LoadFromFilename = fname}) + LoadFromFilename = fname}; + url := {action = Settings.Allow, kind = Settings.Exact, pattern = uri} :: !url) | _ => ErrorMsg.error "Bad 'file' arguments") | _ => ErrorMsg.error ("Unrecognized command '" ^ cmd ^ "'");