Skip to content

Commit

Permalink
Feature/redirect check (#76)
Browse files Browse the repository at this point in the history
* redirect check after request

After the request is made we will check the response history to see if any redirects have happened. If this is the case we will check the current url and check if the path remains the same. If this is not the case than we will stop processing the request.
  • Loading branch information
DigitalTrustCenter committed Jul 11, 2024
1 parent 33b635e commit fee9d4f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sectxt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,9 @@ def _process(self) -> None:
except:
continue
if resp.status_code == 200:
if resp.history:
if not resp.url.endswith(path):
continue
self._path = path
self._url = url
if scheme != "https":
Expand Down

0 comments on commit fee9d4f

Please sign in to comment.