added security checks for ebooks and sites when serving resources in publisher