Skip to content

Commit fb2392f

Browse files
authored
Update readme.md
Default cache-header and index.html served by default. Signed-off-by: Mikkel Mork Hegnhoj <[email protected]>
1 parent 3cb129c commit fb2392f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

readme.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ Let's have a look at the component definition (from `spin.toml`):
1111
[[component]]
1212
source = "spin_static_fs.wasm"
1313
id = "fileserver"
14-
files = ["**/*"]
14+
files = [{ source = "", destination = "/" }]
1515
[component.trigger]
1616
route = "/..."
1717
```
1818

1919
This component will recursively mount all files from the current directory and
20-
will serve them.
20+
will serve them. If an `index.html` file is in the source root, it will be served if no file is specified.
2121

2222
Running the static server:
2323

@@ -42,7 +42,7 @@ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
4242

4343
Currently, this file server has a single cache header that it can set through
4444
the `CACHE_CONTROL` environment variable. If no value is set, the default
45-
`max-age=31536000` is used instead for all media types.
45+
`max-age=60` is used instead for all media types.
4646

4747
### Building from source and using
4848

0 commit comments

Comments
 (0)