This pull request slightly reorganizes the scan result data to support overriding the onion_available result on a per-site basis. I've done this by:
Renaming the Scan.onion_available to Scan.onion_location_header. This reflects that what the scan is testing for right now is the presence or absence of the header.
Add a onion_address field to the Site model. This is a url field that editors can fill in with the known Onion address for the site.
Replace the Scan.onion_available field with a property of the same name that checks if the scanned site has an onion address. If so, then we always return True, otherwise we return the onion_location_header result.
This pull request slightly reorganizes the scan result data to support overriding the
onion_available
result on a per-site basis. I've done this by:Scan.onion_available
toScan.onion_location_header
. This reflects that what the scan is testing for right now is the presence or absence of the header.onion_address
field to theSite
model. This is a url field that editors can fill in with the known Onion address for the site.Scan.onion_available
field with a property of the same name that checks if the scanned site has an onion address. If so, then we always returnTrue
, otherwise we return theonion_location_header
result.Fixes #283