Repository navigation
fix(transcode): route custom verbs after a path variable #141
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
Closed
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
97583aa
fix(transcode): route custom verbs after a path variable
polaz cdedef3
fix(transcode): choose a binding before routing and bound fallthrough
polaz 8cf4676
perf(transcode): borrow path parameters and drop per-request work
polaz d04a543
perf: wrap each route in one layer stack, without boxed middleware
polaz 8f636cf
perf(shield): key and report a limit without allocating
polaz b9da3ac
perf(guard): decide the arrival guards in one layer
polaz a118522
perf(service): serve transcoded routes past the router
polaz 5e7347b
perf(cors): answer CORS from header values built once
polaz 39dabae
perf(service): clone only the path a request takes
polaz 016c983
perf(transcode): draw trace ids without a system call
polaz d99af37
perf(transcode): parse the forwarded header names once
polaz 8f14d66
fix(transcode): match an empty last segment as the router does
polaz a5d5970
fix(transcode): rank refused bindings and own routes among every route
polaz afad72b
fix(transcode): send no Content-Length on a 204 or 304
polaz 2e0b266
fix(transcode): allow every method a path answers on a 405
polaz 9d3c030
fix(transcode): tell captures by position and rank only mounted routes
polaz c984552
fix(transcode): list shared routes under their mounted spelling
polaz 563990d
fix(transcode): keep prefix captures when reading another path's
polaz 0f2f1e9
fix(transcode): take guard methods from mounted routes only
polaz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| # Contributing to structured-proxy | ||
|
|
||
| Bug reports, fixes, documentation and new capabilities are welcome. | ||
|
|
||
| ## Development setup | ||
|
|
||
| ```bash | ||
| git clone https://github.com/structured-world/structured-proxy.git | ||
| cd structured-proxy | ||
| cargo build --features cli | ||
| ``` | ||
|
|
||
| Tests run under [cargo-nextest](https://nexte.st/), which is not part of the | ||
| Rust toolchain: | ||
|
|
||
| ```bash | ||
| cargo install cargo-nextest --locked | ||
| ``` | ||
|
|
||
| Before opening a pull request, run what CI runs. The crate builds with each | ||
| crypto backend, without one and with both, and the code differs between them: | ||
|
|
||
| ```bash | ||
| cargo fmt --all -- --check | ||
| cargo clippy --all-targets --features cli -- -D warnings | ||
| cargo clippy --all-targets --no-default-features --features cli -- -D warnings | ||
| cargo clippy --all-targets --all-features -- -D warnings | ||
| cargo nextest run --features cli | ||
| cargo nextest run --no-default-features --features cli | ||
| cargo nextest run --all-features | ||
| cargo test --doc --all-features | ||
| ``` | ||
|
|
||
| CI runs these on every pull request, and three more checks that need a | ||
| particular toolchain or host. To run them yourself: | ||
|
|
||
| ```bash | ||
| # The minimum supported Rust version, `rust-version` in Cargo.toml. | ||
| rustup toolchain install 1.99 | ||
| cargo +1.99 check --all-targets --all-features | ||
| cargo +1.99 check --all-targets --no-default-features --features cli | ||
|
|
||
| # The static musl build the release ships (Linux, with musl-tools installed). | ||
| rustup target add x86_64-unknown-linux-musl | ||
| cargo nextest run --target x86_64-unknown-linux-musl --features cli | ||
|
|
||
| # The advisory check of the dependencies. | ||
| cargo install cargo-deny --locked | ||
| cargo deny check advisories | ||
| ``` | ||
|
|
||
| The rate-limit reconciliation test runs against Redis when | ||
| `SHIELD_REDIS_TEST_URL` names one (`redis://127.0.0.1:6379/`). | ||
|
|
||
| ## Pull requests | ||
|
|
||
| 1. Create a branch from `main`. | ||
| 2. Make the change, with tests. A bug fix comes with a test that fails without | ||
| it. | ||
| 3. Write commit messages and the pull request title in the | ||
| [Conventional Commits](https://www.conventionalcommits.org/) form; pull | ||
| requests are squash-merged, so the title becomes the commit on `main`. | ||
| 4. A change to what the proxy serves or how it is configured updates the | ||
| README in the same pull request. | ||
|
|
||
| ## Contributor License Agreement (CLA) | ||
|
|
||
| Before a first pull request can be merged, you sign the Structured World | ||
| Contributor License Agreement once, at <https://sw.foundation/cla>. It covers | ||
| every repository of the organisation and takes a minute: sign in with GitHub, | ||
| confirm your e-mail address, sign. The `CLA` status on your pull request then | ||
| turns green by itself. | ||
|
|
||
| You keep the copyright in your contribution. If you contribute as part of your | ||
| job, your employer may also need to sign the corporate agreement; the page | ||
| above explains when. | ||
|
|
||
| ## Security | ||
|
|
||
| Do not report vulnerabilities in public issues; see [SECURITY.md](SECURITY.md). | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| # Security policy | ||
|
|
||
| structured-proxy faces untrusted clients: a way past a guard (auth, rate | ||
| limits, maintenance), a request that reaches the upstream in a form it should | ||
| not, a crash, a hang or unbounded memory on any request is a security issue. | ||
|
|
||
| ## Reporting a vulnerability | ||
|
|
||
| Report it privately through | ||
| [GitHub private vulnerability reporting](https://github.com/structured-world/structured-proxy/security/advisories/new), | ||
| not in a public issue. Include the request or configuration that triggers it, | ||
| the version or commit, the features enabled, and what you observed. | ||
|
|
||
| You will get an answer within a few days. A confirmed issue is fixed in a new | ||
| release, and the advisory is published with credit to you unless you prefer | ||
| otherwise. | ||
|
|
||
| ## Supported versions | ||
|
|
||
| Fixes go into the latest release only. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.