I noticed that when using the Wordpress api in developing mode (yarn start) the api response (wp-json/wp/v2) is using the development domain instead of localhost:3000. Does anyone know how to make wp json api response show links with localhost:3000 as the base domain? Because everytime I click on links that are based on the api response I’m going to the development domain instead of localhost:3000
I also tried to find out how to make the paths in the response relative instead of absolute, but I failed to find how to do it.
I hope anyone can steer me in the right direction, thanks
After having scouted the whole internet I came up with a sort of workaround. The workaround is probably wrong in many ways but its working for me. In functions.php I added the following snippet: