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

Add flag to decompress brotli server-side #2854

Merged
merged 18 commits into from
Dec 12, 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
12 changes: 12 additions & 0 deletions docs/src/guides/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,31 +22,43 @@ Run bitcoind in regtest with:
```
bitcoind -regtest -txindex
```

Create a wallet in regtest with:
```
ord -r wallet create
```

Get a regtest receive address with:
```
ord -r wallet receive
```

Mine 101 blocks (to unlock the coinbase) with:
```
bitcoin-cli -regtest generatetoaddress 101 <receive address>
```

Inscribe in regtest with:
```
ord -r wallet inscribe --fee-rate 1 --file <file>
```

Mine the inscription with:
```
bitcoin-cli -regtest generatetoaddress 1 <receive address>
```

View the inscription in the regtest explorer:
```
ord -r server
```

By default, browsers don't support compression over HTTP. To test compressed
content over HTTP, use the `--decompress` flag:
```
ord -r server --decompress
```

Testing Recursion
-----------------

Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,12 @@ mod media;
mod object;
mod options;
mod outgoing;
mod page_config;
pub mod rarity;
mod representation;
pub mod runes;
pub mod sat;
mod sat_point;
mod server_config;
pub mod subcommand;
mod tally;
mod teleburn;
Expand Down
6 changes: 4 additions & 2 deletions src/page_config.rs → src/server_config.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
use super::*;

#[derive(Clone, Default)]
pub(crate) struct PageConfig {
#[derive(Default)]
pub(crate) struct ServerConfig {
pub(crate) chain: Chain,
pub(crate) csp_origin: Option<String>,
pub(crate) decompress: bool,
pub(crate) domain: Option<String>,
pub(crate) index_sats: bool,
pub(crate) is_json_api_enabled: bool,
}
Loading
Loading