Implement proper Origin support

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>