You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary:
I added a new config option, "GlobalDocument", designed to better suit applications that use a request routing framework and have a single Hack entry point that handles every URI.
Previously the following config and file structure were required:
```
# config.hdf
Server {
ErrorDocument404 = index.php
}
VirtualHost {
default {
PathTranslation = html
}
}
# file structure
lib:
utils.php
...
html:
index.php
```
With this new option the following is possible:
```
# config.hdf
Server {
GlobalDocument = lib/__entrypoint.php
}
# file structure
lib:
utils.php
__entrypoint.php
...
```
This removes the need for a document folder entirely and ensures that every request must go through the single entrypoint. Further, this entrypoint can now be placed in the same folder / module as the rest of the routing framework's core code.
Reviewed By: billf
Differential Revision: D17131684
fbshipit-source-id: 15a2e22ec13f21df31bfd25fee77d129e074f174
0 commit comments