BrowserSync on mobile devices

Hi
I need to test websites on mobile devices. To do that I open on the phones the website using IP of the PC where the website is running (ie. 192.168.1.10:3000). It works but I get many errors in console about the fonts, ie:

Access to font at 'http://localhost:3000/wp-content/themes/myproject/dist/fonts/Roboto.woff' from origin 'http://192.168.1.10:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

or

Access to font at 'http://localhost:3000/wp-content/themes/myproject/dist/vendor/fa-brands-400_9f4ce3dc.woff2' from origin 'http://192.168.1.10:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

My config.json

{
  "entry": {
    "main": [
      "./scripts/main.js",
      "./styles/main.scss"
    ],
    "customizer": [
      "./scripts/customizer.js"
    ]
  },
  "publicPath": "/wp-content/themes/myproject",
  "devUrl": "http://myproject.test:9999",
  "proxyUrl": "http://localhost:3000",
  "cacheBusting": "[name]_[hash:8]",
  "watch": [
    "app/**/*.php",
    "config/**/*.php",
    "resources/views/**/*.php"
  ]
}

You know how to solve? Or is there a better way to test on mobile?
THanks

1 Like