Hello,
We have a problem with the open data site whereby the custom header we have is not replicated in the additional pages feature of the website. The custom header in the site http://geoportal.statistics.gov.uk/ works fine but it doesn't work in any additional pages such as http://geoportal.statistics.gov.uk/pages/news-and-updates - this is because the custom css is being blocked by the browser for the reasons -
We use a custom domain name - geoportal.statistics.gov.uk and XHR requests to / for the opendata.css.txt file, which contains the sites custom CSS, are apparently being blocked by browsers when the site uses a custom domain name. It’s due to the client request missing the Origin header and the server response missing the Access-Control-Allow-Origin header [home-page-custom-css-CORS-error.png]. These headers are actually being included on a second cloned test site that we have set up that does not use a custom domain name [test-site-CORS-included.png].
We’ve also noticed that the sites custom CSS is being included inline within the <head> on the home page [home-page-custom-css-inline.png], however it is not included on child pages [page-missing-custom-inline.png].
Thanks
Matt (ONS Geography)
This looks like a bug. We'll get one created and inform you of any updates
Any help gratefully received
Matt
Is it possible to allow the custom css through to the child pages either inline in the <head> of the child pages.
At the moment the client request is missing the Origin header and the server response is missing the Access-Control-Allow-Origin header for our custom domain site which means it screws up our custom header in our child pages.
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.