-
Notifications
You must be signed in to change notification settings - Fork 302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add custom headers to spec #748
Comments
And interesting and quite useful addition. I like it. An optional Anyone else have thoughts about this? |
@janbinx do you know of other sites in WMN now or that are not in WMN that would use this |
Sorry for the late reply. Well, Insta would be one. It uses a |
I see no downside to this and have altered the schema and submitted it to the project. @janbinx can you adjust the submitted PR to add this header? |
It seems you've set the type for the
Wouldn't it make more sense to cast it as an object and do this instead:
That would certainly be the way you'd use it in a script. I've updated the PR for Github as we discussed previously (I totally missing this, sorry), but currently the PR fails the JSON-checkers as the specs expects an array. |
As @janbinx suggested the proper format for the `headers` parameter is an `object` not `array` as I had made it. Fixing it.
Absolutely agree and that was my bad for not understanding the differences between arrays and objects in JSON. I've adjusted the schema. |
As per #724 (comment) the usage of the JSON-file for some checkers might require custom headers for the checker to behave as expected.
This is currently a not documented requirement. I suggest adding a
headers
field to the specs. This should probably NOT containuser-agent
as this will change and is error prone, but all other required headers for both the exist and missing checks to pass.It could be implementet only for those who need it. This will not break backwards compability and prevent bloating of the JSON.
For Github this could look like so:
As @WebBreacher mentions the http2 pseudo-header
authority
in his example a suggestion in the future might be specifying if a specific version of HTTP is required for the given checker.Github however does not require HTTP2.
The text was updated successfully, but these errors were encountered: