A pre-commit hook to enforce https instead of http
Add this to your .pre-commit-config.yaml
:
- repo: https://github.com/GideonBear/pre-commit-enforce-https
rev: v1.3.0
hooks:
- id: enforce-https
- [This](http://google.com) is a link to google
+ [This](https://google.com) is a link to google
- data = requests.get('http://api.example.com').json
+ data = requests.get('https://api.example.com').json
protocol_sensitive_operation('http://example.com') # allow-http
[This](http://example.com) is a protocol-sensitive link <!-- allow-http -->
<!-- allow-http-in-4-lines -->
```py
from library import function
function('http://example.com')
```