daepark / postmessage

window postmessage plugin for cross-window messaging
http://postmessage.freebaseapps.com
178 stars 55 forks source link

Add option for setting multiple allowed origins when binding #11

Open jonhoo opened 12 years ago

jonhoo commented 12 years ago

The parameter for allowed origins could also be an array of allowed origins to allow multiple sources.

leszekgruchala commented 12 years ago

And there is such solution... http://postmessage.freebaseapps.com/

{ "message": "postmessage origin mismatch", "origin": [ "http://postmessage.freebaseapps.com", "http://www.xyz.com" ] } You can set this globally. However, the origin specified in the bind method will take precedence. pm.origin = "http://www.xyz.com";