open-contracting-extensions / public-private-partnerships

OCDS for Public Private Partnerships (PPPs)
http://standard.open-contracting.org/profiles/ppp/latest/en/
Other
6 stars 3 forks source link

Use GitHub Pages deployment of OCDS Show for PPPs #211

Closed jpmckinney closed 5 years ago

jpmckinney commented 5 years ago

In a recent pull request, I spent a fair amount of time reconciling differences between the ocds-show-ppp repository, and the edited version of it that is stored in this repo.

Instead of embedding ocds-show-ppp in this repo, we should just use the live version at https://open-contracting.github.io/ocds-show-ppp/

On http://standard.open-contracting.org/profiles/ppp/latest/en/example/#explore-the-example, instead of a link like:

../_static/ocds-show/?load=../full_record_package.json

It would be:

https://open-contracting.github.io/ocds-show-ppp/?load=https://standard.open-contracting.org/profiles/ppp/latest/en/_static/full_record_package.json
jpmckinney commented 5 years ago

See https://github.com/open-contracting-extensions/public-private-partnerships/pull/209#discussion_r307908393 for implementation details and rationale.

duncandewhurst commented 5 years ago

This will be easier for one of the devs to do than for me so I've created a Trello card to discuss on the next portfolio call.

jpmckinney commented 5 years ago

I just need ODS to set the CORS headers, as I don't know how to do that in our deployment system (and I don't think I can without write access to opendataservices-deploy). It'll be quick for me to do the rest as I already know exactly what to do.

duncandewhurst commented 5 years ago

Set CORS headers on standard documentation server

Bjwebb commented 5 years ago

We should set this header in the Apache config:

Access-Control-Allow-Origin: *

This header must appear for all JSON files, but shouldn't appear for data review tool pages, to avoid possible future XSS attacks.

Bjwebb commented 5 years ago

CORS headers are now set on the documentation servers - https://github.com/open-contracting/deploy/commit/3f361435bb6ee8e3a82a5c5a8de7b10070910398

The GitHub pages link now works - https://open-contracting.github.io/ocds-show-ppp/?load=https://standard.open-contracting.org/profiles/ppp/latest/en/_static/full_record_package.json