Skip to content

Commit

Permalink
feat: added optional directory listing for the static server
Browse files Browse the repository at this point in the history
  • Loading branch information
jsoverson committed Sep 13, 2023
1 parent a55acff commit 7ca5330
Show file tree
Hide file tree
Showing 14 changed files with 2,083 additions and 1,844 deletions.
2 changes: 2 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ option-utils = { version = "0.1", default-features = false }
opentelemetry = { version = "0.19.0", default-features = false }
opentelemetry-otlp = { version = "0.12.0", default-features = false }
parking_lot = { version = "0.12", default-features = false }
percent-encoding = { version = "2.1" }
paste = { version = "1.0", default-features = false }
pin-project-lite = { version = "0.2", default-features = false }
postgres-openssl = { version = "0.5", default-features = false }
Expand Down
3 changes: 3 additions & 0 deletions crates/wick/wick-config/definitions/v1/manifest.apex
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,9 @@ type StaticRouter @tagged("wick/router/static@v1") {

"Fallback path (relative to volume `resource`) for files to serve in case of a 404. Useful for SPA's. if volume resource is: /www and fallback: index.html, then a 404 will serve /www/index.html"
fallback: string?

"Whether or not to serve directory listings when a directory is requested."
indexes: bool
}

"A router that delegates all requests to the configured operation, optionally encoding/decoding based on the specified codec."
Expand Down
1 change: 1 addition & 0 deletions crates/wick/wick-config/docs/v1.md
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,7 @@ Any one of the following types:
| `middleware` | <code>[`Middleware`](#middleware)</code> |Middleware operations for this router.|||
| `volume` | <code>`string`</code> |The volume to serve static files from.|Yes||
| `fallback` | <code>`string`</code> |Fallback path (relative to volume `resource`) for files to serve in case of a 404. Useful for SPA's. if volume resource is: /www and fallback: index.html, then a 404 will serve /www/index.html|||
| `indexes` | <code>`bool`</code> |Whether or not to serve directory listings when a directory is requested.|||



Expand Down
Loading

0 comments on commit 7ca5330

Please sign in to comment.