More tolerant referer validation so we can access to submodels  with an URL
remove debug
Merge pull request #1230 from Zentyal/jag/core-referer-validation

More tolerant referer validation so we can access to submodels  with an ...