When looking at a project/repo in Pagure over dist-git, AJAX calls to MDAPI don't seem to work on the latest Chrome on F27. I get the following error: Refused to execute script from 'https://apps.fedoraproject.org/mdapi/rawhide/pkg/fedrepo-req?callback=jQuery110206692310512757702_1515685041918&_=1515685041919' because its MIME type ('application/json') is not executable, and strict MIME type checking is enabled
Refused to execute script from 'https://apps.fedoraproject.org/mdapi/rawhide/pkg/fedrepo-req?callback=jQuery110206692310512757702_1515685041918&_=1515685041919' because its MIME type ('application/json') is not executable, and strict MIME type checking is enabled
Basically for jsonp we need application/javascript: https://stackoverflow.com/questions/477816/what-is-the-correct-json-content-type#477819
application/javascript
Metadata Update from @pingou: - Issue assigned to pingou
Ok I've adjusted stg with the putative fix, mind testing it there?
The stage dist-git still uses the prod MDAPI so I don't have any easy way to test this without running the JS code myself. Does it work for you?
Seems so:
$ http --headers "https://apps.stg.fedoraproject.org/mdapi/branches?callback=foobar" HTTP/1.1 200 OK AppServer: proxy01.stg.phx2.fedoraproject.org AppTime: D=224678 Connection: Keep-Alive Content-Encoding: gzip Content-Length: 105 Content-Type: application/javascript; charset=utf-8 Date: Mon, 15 Jan 2018 15:41:02 GMT Keep-Alive: timeout=15, max=500 Referrer-Policy: same-origin Server: Python/3.6 aiohttp/2.3.0 Strict-Transport-Security: max-age=15768000; includeSubDomains; preload Vary: Accept-Encoding X-Content-Type-Options: nosniff X-Frame-Options: SAMEORIGIN
Commit 94e2ef3 fixes this issue
Log in to comment on this ticket.