Skip to content

Allow a site to bust out of IFrame #2154

@github-zeronet

Description

@github-zeronet

Is your feature request related to a problem? Please describe.

The types of sites we can create is very limited today by CORS and IFrame limitations.

Describe the solution you'd like
Allow sites the option to be served outside of IFrame.

I realize the first reaction will be security concerns. But, keep in mind, this is only for site owners choosing to do this. By default, sites will continue to operate under the IFrame.

I don't understand the concerns about file access because these files are all viewable and editable by any user via their file system. You would want to enforce directory traversal protections, of course. And you can, if needed, refactor it so the site's static content is in a folder inside the base site folder. If a browser has no way to traverse to parent folders, then only the static content can be accessed.

As for API limitations, perhaps there is a happy way to put the IFrame inside the site, instead of outside, perhaps with a tag the server can recognize and replace.

We could have a permission on content.json that allows a site to be served without the IFrame being wrapped around it, but allows a tag inside the site's content that can be replaced by NZ with the IFrame.

Describe alternatives you've considered
Anything and everything that solves CORS and IFrame issues.

Additional context
There is no known way to get a simple static Angular 8 site up and running in ZN due to the limitations of the IFrame. The demo site works without an issue in Apache HTTPD.

Here is documentation in ZN of that test and the resulting issues:

Testing a static Angular site in ZeroNet

... for the ZeroNet ecosystem!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions