Map LocalPaid Feature
Map Local rules prevent requests being actually sent to servers and respond to clients with responses whose bodies are content of local files.
What About Response Headers?
Besides connection-related headers like Content-Length
, Connection
, Map Local rules also set Content-Type
response headers based on file extensions. No other response headers will be sent.
You can map requests to a single file or an entire folder.
Mapping to a File
Mapping to a file is straightforward: the rule responds to the client with the content of the file.
Mapping to a Folder
Mapping to a folder requires you to specify a URL path prefix. Only requests whose URL path starts with the prefix will be mapped. The path name striped with the prefix will be used to find the file in the folder.
Say the folder is /fol/der
, and the path prefix is /pre/fix
.
- If the request's path is
/foo/bar
, it will not be mapped because the path isn't prefixed with/pre/fix
. - If the request's path is
/pre/fix/foo/bar
, it will be mapped into the file/fol/der/foo/bar
.
Fallback Behavior
In the case where the file doesn't exist or reading fails in some other way like permission denied, you can choose to let the rule either respond 404 Not Found
or simply do nothing: the request will be passed through other rules if any, and sent out to the server.
Sometimes Proxie fails to read files even though it can be opened by hand.
Living in the sandbox, Proxie has to utilize security-scoped bookmarks to keep persistent access to files across launches. Bookmarks may expire, resulting in failures of reading files.
To renew the bookmark, you need to reselect the file or folder in the Map Local rule editor.