1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# An example for a server which uses URL storage with data located at "https://127.0.0.1:8081".
# The URL backend fetches data over HTTP: use `parse.kind = "bytes"` to fetch raw bytes, or
# `parse.kind = "json_path"` to read a JSON manifest using JSONPath.
# Run with
# `cargo run -p htsget-axum --all-features -- --config htsget-config/docs/examples/url_storage.toml`
# in the project directory.
= "127.0.0.1:8082"
= "All"
= "cert.pem"
= "key.pem"
= "None"
# The simplest configuration fetches raw bytes and forwards/reflects all headers.
= "https://127.0.0.1:8081"
## Or, set using regex locations and the `Url` backend directly.
#[[locations]]
#regex = ".*"
#substitution_string = "$0"
#
#backend.kind = "Url"
#backend.url = "https://127.0.0.1:8081"
#
## Fetch raw bytes from `url`.
#backend.parse.kind = "bytes"
## Optionally override the URL used in returned tickets.
#backend.parse.ticket_url = "https://127.0.0.1:8081"
#
## Or, read a JSON manifest and locate the data using JSONPath.
#backend.parse.kind = "json_path"
#backend.parse.content_path = "$.content"
#backend.parse.size_path = "$.size"
## Take the ticket URL from a JSONPath...
#backend.parse.ticket_path = "$.response"
## ...or hard-code it as a static URL (mutually exclusive with `ticket_path`).
#backend.parse.ticket_url = "https://example.com"
#
## Forward matching request headers to the backend server.
#backend.forward.headers.allow = ["Authorization", "Content-*"]
## Optionally denylist headers. These get applied after the allowlist.
#backend.forward.headers.deny = ["X-Internal-*"]
#
## Reflect matching response headers back to the client in tickets.
#backend.reflect.headers.allow = ["Authorization", "Content-*"]
#backend.reflect.headers.deny = ["X-Internal-*"]
#
## Set client authentication
#backend.http.key = "key.pem"
#backend.http.cert = "cert.pem"
#
## Set root certificates
#backend.http.root_store = "root.crt"
#
## Disable HTTP caching
#backend.http.use_cache = false
#
## Configure cache policy
#backend.http.cache.ttl_ceiling_secs = 3600
#backend.http.cache.store.kind = "in_memory"
#backend.http.cache.store.capacity = 10000