Browsersync + AJAX

Hi there,

I’m using Sage as base theme on my custom vagrant with puphpet and this is because I wan’t to have identical configuration as on client server, with CentOS.
When I access my site on browsersync url localhost:3000/ first of all it is slower then when I access it on my dev.url.
Secondly AJAX functions don’t work because of cross domain policy.

I can see in source, that all content is loaded from ‘/wp-content/…’ but ‘ajax_url’ localized variable is ‘dev.url/wp-admin/admin-ajax.php’.

Could someone point me where to look for the solution, or what I did wrong?
And what can I do regarding the speed?

Thanks in advanced

I have managed to find a solution regarding the speed.
Strangely if your dev url contains .local things get slower, so I have changed my url from project.local to and now the speed is back to normal.

You’ll need to enable CORS on your local dev environment

This wouldn’t be related to anything in Sage. Are you also using Soil?

Hi Ben,

Thanks for reply.
You are right sorry, I have my own fork of Sage which has soil included, like it was in some earlier versions of roots.

Will check the links, thanks.