enum classafPillow::WelcomePageStrategy
sys::Obj sys::Enum afPillow::WelcomePageStrategy
@
Serializable { simple=true }
Defines a strategy for handling the interaction between welcome page and directory URIs. The redirect options are useful for diverting legacy traffic to your new pages. Note that to prevent conflicting URIs, only pages with no context and no events are redirected.
To change the strategy set the application default in your AppModule
. Example:
@Contribute { serviceType=ApplicationDefaults# } static Void contributeApplicationDefaults(Configuration config) { config[PillowConfigIds.welcomePageStrategy] = WelcomePageStrategy.off }
- fromStr
static new fromStr(Str name, Bool checked := true)
Return the WelcomePageStrategy instance for the specified name. If not a valid name and checked is false return null, otherwise throw ParseErr.
- isOn
Bool isOn()
Returns
true
is theWelcomePageStrategy
ison
.- off
const static WelcomePageStrategy off := ...
Welcome pages are accessed via their normal URIs and directory URIs return 404s.
/app/index --> 200 OK /app/ --> 404 Not Found
- offWithRedirects
const static WelcomePageStrategy offWithRedirects := ...
Welcome pages are accessed via their normal URIs and directory URIs are redirected to the welcome page.
/app/index --> 200 OK /app/ --> 307 Temporary Redirect to '/index'
- on
const static WelcomePageStrategy on := ...
Welcome pages are accessed via directory URIs and welcome page URIs return 404s.
/app/index --> 404 Not found /app/ --> 200 OK
- onWithRedirects
const static WelcomePageStrategy onWithRedirects := ...
Welcome pages are accessed via directory URIs and welcome page URIs are redirected to the directory URI.
/app/index --> 307 Temporary Redirect to '/' /app/ --> 200 OK
This is the default setting.
- vals
const static WelcomePageStrategy[] vals := ...
List of WelcomePageStrategy values indexed by ordinal