Does that mean that the origin will be http://foo.com/bar.html/  if the url is http://foo.com/bar.html ? That should be http://foo.com