directions/v2/ (and v1) has no Access-Control-Allow-Origin header

15 posts / 0 new
Last post
StudioZoetekauw
directions/v2/ (and v1) has no Access-Control-Allow-Origin header

If you open /geocoding/v1/ in your browser, you will see the Access-Control-Allow-Origin header.

If you do the same for directions/v2/ (or v1) you do not get the Access-Control-Allow-Origin header. 

This disables us in integrating this service in our own website. The geocoding is working, but for directions we receive an Access-Control-Allow-Origin error.


MQBrianCoakley
I'm seeing the cors headers
I'm seeing the cors headers in all of my tests. Are you still missing them?

StudioZoetekauw
CORS headers added as JPG

Hi MQBrianCoakley,

Thank you for your quick reply.

Unfortenately, we are still missing the CORS headers for the directions API.

We have created an image, combining the CORS headers from the routing API and the directions API. As you can see, the acces-control-allow-origin is missing on the directions API.

Regards,

Berend.


StudioZoetekauw
Question not updated

Hi MQBrianCoakley,

I added an reply to this question last friday. Somehow it is not added to the forum. I included a screenshot of the cors headers that I see.

I am still missing the cors headers for the directions API. I can see them for the routing API, but not for the directions API.

Can you show me a screenshot of your cors headers for the directions API?

Thanks in advance!

Berend.


MQBrianCoakley
Can you post a sample url
Can you post a sample url that is not getting the cors headers?

StudioZoetekauw
Sure, here you go:

MQBrianCoakley
Thanks for the additional
Thanks for the additional information. This has been forwarded onto the team to investigate.

StudioZoetekauw
Thank

Great! Thank you for investigating.


StudioZoetekauw
Update

Hi MQBrianCoakley,

Is there any update available on this issue?

Our project has to be online within two weeks. It would be great if we could integrate your directions API.

Regards.


MQBrianCoakley
No update yet. It may be soon
No update yet. It may be soon, but not in 2 weeks.

StudioZoetekauw
Ok. Till then, I will use an

Ok. Till then, I will use an online CORS proxy.

Regards,

Berend.


MQBrianCoakley
The cors header issue should
The cors header issue should be resolved. Let us know if you see any lingering issues.

ii2a
 

 

Hi Brian, youve actually helped me on this before, on the day you posted this fix :) I have a new key now, no longer my enterprise key but i get the same old response as i had had previously

XMLHttpRequest cannot load http://open.mapquestapi.com/directions/v2/routematrix?key=[my new key]. Request header field Content-Type is not allowed by Access-Control-Allow-Headers in preflight response.

if i use the old enterprise key which is still active but being closed down due to change in paln, it works fine. 

any ideas?


MQBrianCoakley
The old EE key should
The old EE key should continue working. It will be converted to a self serve key and get transaction limits, but it should continue working.

ii2a
sorry my bad in poor

sorry my bad in poor explanation. i have a new key (completely new sign up) and i get CORS issues when trying to use the routeMatrix api. You fixed this issue for me with the EE key and that still works, but before i push the updated code I obviously need to figure out why the the new key does not work.