Skip to content

Commit

Permalink
Add capacitorjs support
Browse files Browse the repository at this point in the history
  • Loading branch information
andresavic committed Jan 11, 2021
1 parent ae2368c commit 3789e5b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions timesync-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ WebApp.rawConnectHandlers.use("/_timesync",
// and http://meteor.local for earlier versions
const origin = req.headers.origin;

if (origin && ( origin === 'http://meteor.local' ||
origin === 'meteor://desktop' ||
if (origin && ( origin === 'http://meteor.local' ||
origin === 'capacitor://meteor.local' ||
origin === 'meteor://desktop' ||
/^http:\/\/localhost:1[23]\d\d\d$/.test(origin) ) ) {
res.setHeader('Access-Control-Allow-Origin', origin);
}
Expand Down

0 comments on commit 3789e5b

Please sign in to comment.