closes #207 header suggestions sorted by relevance

This commit is contained in:
Ashita Prasad
2024-11-10 03:19:51 +05:30
parent ae477df51a
commit 5ffc25bfe6
2 changed files with 12 additions and 9 deletions

View File

@ -114,15 +114,15 @@ void main() {
test("Testing using 'x-' pattern", () {
String pattern = "x-";
List<String> expected = [
"Access-Control-Max-Age",
"Max-Forwards",
"X-Api-Key",
"X-Content-Type-Options",
"X-CSRF-Token",
"X-Forwarded-For",
"X-Frame-Options",
"X-Requested-With",
"X-XSS-Protection"
"X-XSS-Protection",
"Max-Forwards",
"Access-Control-Max-Age",
];
expect(getHeaderSuggestions(pattern), expected);
});
@ -130,11 +130,11 @@ void main() {
test("Testing for 'origin' pattern", () {
String pattern = "origin";
List<String> expected = [
'Access-Control-Allow-Origin',
'Origin',
'Cross-Origin-Embedder-Policy',
'Cross-Origin-Opener-Policy',
'Cross-Origin-Resource-Policy',
'Origin'
'Access-Control-Allow-Origin',
];
expect(getHeaderSuggestions(pattern), expected);
});