dis-moi / backend

DisMoi Bakend API - 💬 Stay informed everywhere on the web
https://api.dismoi.io/v4
Other
5 stars 2 forks source link

Return HTTPS urls in /api/v1/matchingcontexts #40

Closed DavidBruant closed 8 years ago

DavidBruant commented 8 years ago

Currently, https://preprod-lmem-craft-backend.cleverapps.io/api/v1/matchingcontexts returns :

[{"recommendation_url":"http:\/\/preprod-lmem-craft-backend.cleverapps.io\/api\/v1\/recommendation\/3","url_regex":"20minutes.fr\/societe\/1860259-20160606-violences-policieres-quarante-huit-enquetes-judiciaires-ouvertes-police-polices"},{"recommendation_url":"http:\/\/preprod-lmem-craft-backend.cleverapps.io\/api\/v1\/recommendation\/6","url_regex":"http:\/\/tests.menant-benjamin.fr\/?$"},{"recommendation_url":"http:\/\/preprod-lmem-craft-backend.cleverapps.io\/api\/v1\/recommendation\/9","url_regex":"http:\/\/www.lactalis.fr\/le-groupe\/histoire\/"},{"recommendation_url":"http:\/\/preprod-lmem-craft-backend.cleverapps.io\/api\/v1\/recommendation\/9","url_regex":"http:\/\/www.lactalis.fr\/le-groupe\/chiffres-cles\/#\/ca"},{"recommendation_url":"http:\/\/preprod-lmem-craft-backend.cleverapps.io\/api\/v1\/recommendation\/10","url_regex":"http:\/\/www.bonbonsgourmands.fr\/"},{"recommendation_url":"http:\/\/preprod-lmem-craft-backend.cleverapps.io\/api\/v1\/recommendation\/11","url_regex":"http:\/\/www.fnac.com\/mp23768793\/Wiko-Highway-Signs-violet-3G-HSPA-8-Go-GSM-Android-smartphone\/w-4"}]

The recommendation_url field contains http urls. It should be https urls, otherwise it forces to add a new CSP exception in the manifest while there is no good reason (especially given the time was spent to have proper HTTPS support even in staging :-p). This is a block for https://github.com/insitu-project/proto-ext/pull/59 (it could be unblocked by changing the CSP but a backend change would be more appropriate)

bmenant commented 8 years ago

May (or not) be related to https://github.com/insitu-project/kraft-backend/issues/9

bmenant commented 8 years ago

So far so good! Fixed by https://github.com/insitu-project/kraft-backend/pull/51