sPavl0v / react-spa-prenderer

MIT License
34 stars 17 forks source link

Added UserAgent Config to puppeteer #23

Closed gugacarbo closed 1 year ago

gugacarbo commented 1 year ago

added userAgent config to verify if is is the pre-render

.resp.json

{
  "engine":{
    "gotoOptions":{
      "userAgent": "SnapShot Agent"
    }
  },
  "routes": ["/"]
}

in any .js file

if(navigator.userAgent = "Agent"){
 ...
}