Skip to content

Commit

Permalink
chore: update README.md and refine proxy_filter warning msg
Browse files Browse the repository at this point in the history
  • Loading branch information
WSH032 committed Dec 17, 2023
1 parent 3e9f840 commit c7cec23
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 0 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
<!-- copy from: https://github.com/encode/starlette/blob/master/.github/pull_request_template.md -->

<!-- Thanks for contributing 💚
Given this is a project maintained by volunteers, please read this template to not waste your time, or ours! 😁 -->

Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ So, it perfectly supports all features of [httpx.AsyncClient](https://www.python
> visit our `CHANGELOG.md` for more info.
```shell
pip install fastapi-proxy-lib
pip install fastapi-proxy-lib[standard]
```

Perhaps you've noticed that we're installing `fastapi-proxy-lib[standard]` instead of `fastapi-proxy-lib`. The difference is:
Expand Down Expand Up @@ -108,6 +108,10 @@ English is not the native language of the author (me), so if you find any areas

If you think this project helpful, consider giving it a star ![GitHub Repo stars](https://img.shields.io/github/stars/wsh032/fastapi-proxy-lib?style=social), which makes me happy. :smile:

## Refers

[Can fastapi proxy another site as a response to the request?](https://github.com/tiangolo/fastapi/discussions/7382)

## License

This project is licensed under the terms of the *Apache License 2.0*.
Expand All @@ -119,7 +123,7 @@ This project is licensed under the terms of the *Apache License 2.0*.
[CI: lint-test#link]: https://github.com/WSH032/fastapi-proxy-lib/actions/workflows/lint-test.yml
[CI: docs]: https://github.com/WSH032/fastapi-proxy-lib/actions/workflows/docs.yml/badge.svg?branch=main
[CI: docs#link]: https://github.com/WSH032/fastapi-proxy-lib/actions/workflows/docs.yml
[CI: publish]: https://github.com/WSH032/fastapi-proxy-lib/actions/workflows/publish.yml/badge.svg?branch=main
[CI: publish]: https://github.com/WSH032/fastapi-proxy-lib/actions/workflows/publish.yml/badge.svg
[CI: publish#link]: https://github.com/WSH032/fastapi-proxy-lib/actions/workflows/publish.yml
[pre-commit.ci status]: https://results.pre-commit.ci/badge/github/WSH032/fastapi-proxy-lib/main.svg
[pre-commit.ci status#link]: https://results.pre-commit.ci/latest/github/WSH032/fastapi-proxy-lib/main
Expand Down
6 changes: 4 additions & 2 deletions src/fastapi_proxy_lib/core/_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,11 +419,13 @@ def warn_for_none_filter(
if proxy_filter is None:
msg = dedent(
"""\
The proxy filter is None, which means no filter will be used.
This is not recommended, because it may cause security issues.
The `proxy_filter` is None, which means no filter will be used.
It is not recommended, because it may cause security issues.
A default proxy filter will be used, which will reject the proxy request:
- if the host of url is ip address, and is not global ip address.
More info: https://wsh032.github.io/fastapi-proxy-lib/Usage/Security/
"""
)
warnings.warn(msg, stacklevel=3)
Expand Down

0 comments on commit c7cec23

Please sign in to comment.