Jump to the following:

OS uses cookies to improve this website. Read about cookies

  • twitter
  • Google+
  • facebook

Web-Map Builder

HTTP referer not valid when running on secure server

bunkswales
  • john
  • Rating: 4 points Newbie
    • 11 July 2016 10:59AM
    • 392 Views
    • Visits: 46
    • Discussions: 2
    • Responses: 3
    • Registered: 27 April 2011 10:33PM
    • Last active: 11 July 2016 07:55PM

    I am trying to set up a few map pages within our website which can be viewed only by family and close friends. Initially I put them onto the http server at http://www.bunkhousemidwales.co.uk and everything worked fine. However I decided that they would be better hosted securely with password protection so have now put them on https://bunkhousemidwales.co.uk and added the url to the list of addresses that my api key points to. As a result of this I get a 'HTTP referer not valid' message every time I try to view them. I have deleted my history as this has appeared to cause problems in the past when moving pages such as these but doing so has made no difference.

    4 responses

    OS OpenSpace TeamOS OpenSpace Team
      • 11 July 2016 01:09PM
      • 387 Views
      • Visits: 12,881
      • Discussions: 127
      • Responses: 1,246
      • Registered: 31 January 2008 01:50PM
      • Last active: 1 June 2017 08:04AM

      Hi,

      The root domain had not been added to the API key - this has now been added, and the key should work on your site in the next few hours.

      Kind regards,

      OS OpenSpace Team

      skywaretony
        • 27 November 2017 01:46PM
        • 38 Views
        • Visits: 0
        • Discussions: 0
        • Responses: 0
        • Registered: 27 November 2017 01:40PM
        • Last active: 27 November 2017 01:40PM

        I am having a very similar problem. I have some maps running very well on our server http://www.skyware.co.uk and since then I have added an SSL certificate to make it securer, but although I have added the https://www.skyware.co.uk to my key (and various variants), the maps don't show at all - just an empty box. Am I missing something?

        mgoodge
          • 28 November 2017 05:08PM
          • 36 Views
          • Visits: 1
          • Discussions: 1
          • Responses: 0
          • Registered: 18 October 2017 06:16PM
          • Last active: 28 November 2017 05:04PM

          I'm having exactly the same problem. My key simply doesn't work with https URLs, despite those urls being correctly enabled in the API console.

          This is extremely frustrating, as it means I have to hard-code an exception to the https-everywhere rule just for the map page.

          skywaretony
            • 4 December 2017 07:01PM
            • 21 Views
            • Visits: 0
            • Discussions: 0
            • Responses: 0
            • Registered: 27 November 2017 01:40PM
            • Last active: 27 November 2017 01:40PM

            Problem solved!

            I contacted newbusinessenquiries@ordnancesurvey.co.uk with the problem and they were very quick to get onto it.

            Their technical support team noticed that my scripts had the line:
            http://openspace.ordnancesurvey.co.uk/osmapapi/openspace.js?key= ...etc.
            instead of:
            https://openspace.ordnancesurvey.co.uk/osmapapi/openspace.js?key= ...etc.

            Once I'd gone through and changed the beginning to https: etc then they work fine.

            I guess when I used their web builder some time ago it used to produce the script pointer using http and now uses https

            It makes sense now I see it.

            Well spotted technical team!

            Please login or sign-up to respond to this discussion.

            © Ordnance Survey 2016