mirror of
https://github.com/foss42/apidash.git
synced 2025-05-30 13:27:09 +08:00
closes #207 header suggestions sorted by relevance
This commit is contained in:
@ -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);
|
||||
});
|
||||
|
Reference in New Issue
Block a user