Skip to content

Update HTTP Observatory integration to MDN API v2#178

Open
yamakenjp wants to merge 1 commit into
TheKinrar:masterfrom
yamakenjp:update-mdn-observatory-v2
Open

Update HTTP Observatory integration to MDN API v2#178
yamakenjp wants to merge 1 commit into
TheKinrar:masterfrom
yamakenjp:update-mdn-observatory-v2

Conversation

@yamakenjp

Copy link
Copy Markdown

Closes #177

Summary

This updates the HTTP Observatory integration from the legacy Mozilla v1 endpoint to the current MDN HTTP Observatory v2 endpoint.

The old endpoint currently used by jobs/check_instance_obs.js is:

https://http-observatory.security.mozilla.org/api/v1/analyze?host=...

According to the MDN FAQ, the updated API endpoint is:

https://observatory-api.mdn.mozilla.net/api/v2/scan?host=...

Reference:
https://developer.mozilla.org/en-US/observatory/docs/faq#has_the_http_observatory_api_been_updated_to_use_the_new_tests

Changes

  • Replace the legacy Observatory v1 endpoint with the MDN v2 scan endpoint.
  • Use the v2 response's grade and score fields directly when error is not set.

Motivation

The legacy Observatory data can remain stale. For example, mstdn.yamaken.jp currently shows an old Observatory timestamp on instances.social, while the current MDN Observatory scan returns fresh results.

Testing

Not run locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update HTTP Observatory integration to MDN API v2

1 participant