canonical / ubuntu-com-security-api

The API for CVEs and USNs data.
17 stars 9 forks source link

API docs not accessible in Firefox, Chrome because of invalid content-type #120

Closed desrod closed 3 months ago

desrod commented 1 year ago

The API docs cannot be viewed or rendered in Firefox/Linux, Chrome/Linux, Firefox/macOS nor Safari/macOS because of the invalid content-type for one of the external assets linked on the page:

<title>Security API Docs</title>
  <script src="[https://unpkg.com/swagger-ui-dist@4.12.0/swagger-ui-bundle.js](view-source:https://unpkg.com/swagger-ui-dist@4.12.0/swagger-ui-bundle.js)" crossorigin></script>
  <script src="[https://unpkg.com/swagger-ui-dist@4.12.0/swagger-ui-standalone-preset.js](view-source:https://unpkg.com/swagger-ui-dist@4.12.0/swagger-ui-standalone-preset.js)" crossorigin></script>
  $ curl -Isq https://unpkg.com/swagger-ui-dist@4.12.0/swagger-ui-standalone-preset.js | grep content
content-type: application/javascript; charset=utf-8

vs.

$ curl -Isq https://unpkg.com/swagger-ui-dist@4.12.0/swagger-ui-bundle.js | grep content-type
content-type: text/html; charset=utf-8

Which results in the following:

2023-01-11_11-49

Oddly, this does work using TorBrowser on both Linux and macOS.

mtruj013 commented 1 year ago

Thanks for reporting this @desrod. This page renders successfully for me on Fireforx/Linux, Chrome/Linux, Safari/macOS and Firefox/macOS. Could you please confirm if you're still having this issue? Thanks

samhotep commented 3 months ago

Closed due to inactivity.