NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Hello,

I have been playing around with an instance OSRM old api version 4.0 with an instance of the open street map website.

I have setup OSRM with a small extract and it serves perfectly fine returning directions if requested through the browser.

When I try to send the request through my open street map website I get a 200 ok with the following error (In firefox and chrome):

XMLHttpRequest cannot load http://osrmURL/viaroute?z=14&output=json&instructions=true&loc=39.0704%2C-76.5452&loc=38.9786%2C-76.4928. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://osmwebsiteURL' is therefore not allowed access.

I must be missing something, but can't seem to find the issue.

Thanks.

asked 25 Oct '16, 13:45

Cellington's gravatar image

Cellington
21691015
accept rate: 0%


I upgraded to osrm version 4.6 (with CORS support) and now everything works great.

permanent link

answered 25 Oct '16, 16:07

Cellington's gravatar image

Cellington
21691015
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×305
×98
×85
×2

question asked: 25 Oct '16, 13:45

question was seen: 4,410 times

last updated: 25 Oct '16, 16:07

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum