Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added optional directory listing for the static server #437

Merged
merged 1 commit into from
Sep 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading