Open jfallows opened 2 years ago
When request arrives for / then support propagating a default filename, such as index.html.
/
index.html
This can be handled by a routing rule such as:
{ "type" : "http-filesystem", "kind": "proxy", "routes": [ { "when": [ { "path": "/" } ], "exit": "filesystem_server0", "with": { "path": "index.html" } }, { "when": [ { "path": "/{path}" } ], "exit": "filesystem_server0", "with": { "path": "${params.path}" } } ] }
However, it may be more helpful to support the concept of a welcome-path in http-filesystem binding options.
welcome-path
http-filesystem
options
{ "type" : "http-filesystem", "kind": "proxy", "options": { "welcome-path": "/index.html" } "routes": [ { "when": [ { "path": "/{path}" } ], "exit": "filesystem_server0", "with": { "path": "${params.path}" } } ] }
Then when the / request arrives, it is treated as if it was /index.html.
/index.html
Hey @jfallows, I would like to give this issue a try. Can you please assign this to me?
When request arrives for
/
then support propagating a default filename, such asindex.html
.This can be handled by a routing rule such as:
However, it may be more helpful to support the concept of a
welcome-path
inhttp-filesystem
bindingoptions
.Then when the
/
request arrives, it is treated as if it was/index.html
.