Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

feat(deprecation): Add X-Deprecation-Override header to requests to the API #316

Merged
merged 3 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/js/observatories/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,9 @@ const loadHostHistory = async () => {
state.history = data;
insertHostHistory();
},
headers: {
'X-Deprecation-Override': 'yes'
},
url: API_URL
});
};
Expand Down Expand Up @@ -496,6 +499,9 @@ const handle = async scan => {
loadHostHistory();
insert(this.scan, data);
},
headers: {
'X-Deprecation-Override': 'yes'
},
url: constants.urls.api + 'getScanResults?scan=' + scan.scan_id.toString()
});
}
Expand All @@ -521,6 +527,9 @@ const submit = async (hostname, successCallback, errorCallback, method, rescan,
error: errorCallback,
method: method,
success: successCallback,
headers: {
'X-Deprecation-Override': 'yes'
},
url: constants.urls.api + 'analyze?host=' + hostname
};

Expand Down
9 changes: 9 additions & 0 deletions src/js/statistics.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,9 @@ export const load = async () => {
$('#results-reveal-container').remove();
},
success: function s(data) { insertHTTP(data); },
headers: {
'X-Deprecation-Override': 'yes'
},
url: constants.urls.api + '__stats__'
});

Expand All @@ -180,6 +183,9 @@ export const load = async () => {
// remove stats section
},
success: function s(data) { insertSSH(data); },
headers: {
'X-Deprecation-Override': 'yes'
},
url: constants.urls.ssh + 'stats'
});

Expand All @@ -188,6 +194,9 @@ export const load = async () => {
// remove stats section
},
success: data => insertTLS(data),
headers: {
'X-Deprecation-Override': 'yes'
},
url: constants.urls.tls + '__stats__?format=json'
});
};
Expand Down