https://github.com/frankie567/safe-redirect-url
Check the safety of a redirect URL. Extracted from Django's `url_has_allowed_host_and_scheme`.
https://github.com/frankie567/safe-redirect-url
Last synced: 6 months ago
JSON representation
Check the safety of a redirect URL. Extracted from Django's `url_has_allowed_host_and_scheme`.
- Host: GitHub
- URL: https://github.com/frankie567/safe-redirect-url
- Owner: frankie567
- License: mit
- Created: 2023-12-18T08:31:52.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-18T09:07:47.000Z (almost 2 years ago)
- Last Synced: 2025-03-10T07:36:51.235Z (7 months ago)
- Language: Python
- Homepage: https://frankie567.github.io/safe-redirect-url/
- Size: 15.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Safe Redirect URL
Check the safety of a redirect URL. Extracted from Django's `url_has_allowed_host_and_scheme`.[](https://github.com/frankie567/safe-redirect-url/actions)
[](https://codecov.io/gh/frankie567/safe-redirect-url)
[](https://badge.fury.io/py/safe-redirect-url)---
**Documentation**: https://frankie567.github.io/safe-redirect-url/
**Source Code**: https://github.com/frankie567/safe-redirect-url
---
## Development
### Setup environment
We use [Hatch](https://hatch.pypa.io/latest/install/) to manage the development environment and production build. Ensure it's installed on your system.
### Run unit tests
You can run all the tests with:
```bash
hatch run test
```### Format the code
Execute the following command to apply linting and check typing:
```bash
hatch run lint
```### Publish a new version
You can bump the version, create a commit and associated tag with one command:
```bash
hatch version patch
``````bash
hatch version minor
``````bash
hatch version major
```Your default Git text editor will open so you can add information about the release.
When you push the tag on GitHub, the workflow will automatically publish it on PyPi and a GitHub release will be created as draft.
## Serve the documentation
You can serve the Mkdocs documentation with:
```bash
hatch run docs-serve
```It'll automatically watch for changes in your code.
## License
This project is licensed under the terms of the MIT license.