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

docs: add docs for RateLimiter #120

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

xialeistudio
Copy link

@xialeistudio xialeistudio commented Mar 7, 2024

Add a RateLimiter quickstart to docs.
#87

Co-authored-by: Dany Gagnon <ddanygagnon@gmail.com>
@mustafasegf
Copy link

hey, while this code compiles, it gives 403 error while trying because the host header isn't modified to one.one.one.one. It would be better for the example to also add

    async fn upstream_request_filter(
        &self,
        _session: &mut Session,
        upstream_request: &mut RequestHeader,
        _ctx: &mut Self::CTX,
    ) -> Result<()> {
        upstream_request.insert_header("Host", "one.one.one.one").unwrap();
        Ok(())
    }

just like in the https://github.com/cloudflare/pingora/blob/36e09ca389dac053948722a8ed24caa011495439/docs/quick_start.md

@xialeistudio
Copy link
Author

hey, while this code compiles, it gives 403 error while trying because the host header isn't modified to one.one.one.one. It would be better for the example to also add

    async fn upstream_request_filter(
        &self,
        _session: &mut Session,
        upstream_request: &mut RequestHeader,
        _ctx: &mut Self::CTX,
    ) -> Result<()> {
        upstream_request.insert_header("Host", "one.one.one.one").unwrap();
        Ok(())
    }

just like in the https://github.com/cloudflare/pingora/blob/36e09ca389dac053948722a8ed24caa011495439/docs/quick_start.md

Thanks to your valuable reminder, I have promptly addressed the issue.

@eaufavor eaufavor added the documentation Improvements or additions to documentation label Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants