v148 · PWA · Web APIs

Origin Validator

Enter a source and destination origin to check whether the migration meets the same-site constraint and old-origin authorization requirement. A valid pair generates ready-to-paste migrate_to, migrate_from, and association-file snippets.

Migration manifest pattern

// Old origin manifest can advertise the destination
{
  "name": "My App",
  "id": "/",
  "migrate_to": {
    "id": "https://www.example.com/",
    "install_url": "https://www.example.com/install"
  }
}

// New origin manifest claims the old app
{
  "name": "My App",
  "id": "/",
  "migrate_from": [{
    "id": "https://app.example.com/",
    "install_url": "https://app.example.com/install",
    "behavior": "suggest"
  }]
}

// Old origin /.well-known/web-app-origin-association
{
  "https://www.example.com/": { "allow_migration": true }
}

references