Code Monkey home page Code Monkey logo

nextcloud-htmlviewer's Introduction

Html Viewer

View static HTML files directly in Nextcloud

HTML files can be a great way to illustrate content in an interactive and responsive format. The HTML viewer app enables viewing and editing of static HTML files directly within Nextcloud.

Security information

Loading HTML files within the context of Nextcloud carries a risk of exposing user information to third parties, depending on the configuration of the server. The HTML viewer app uses the sandbox and CSP features for iframes to disable JavaScript and prevent access to user information and websites outside your Nextcloud, but this can not guarantee that no information is ever transferred to third parties.

Administrators should also be aware that some users may not be able to differentiate between the content of an HTML file they have opened and the normal user interface of Nextcloud.

JavaScript

JavaScript for HTML files is disabled by default. Enabling it is a bad idea and we do not recommend this at all. Although security features like sandboxing, CSP and CORS limit what can be done, it still means that unknown code is being executed within Nextcloud.

If you still wish to enable JS, this occ command will enable it:

./occ config:app:set htmlviewer allowJs --value=true --type=boolean

File Size Limit

By default, the app will load HTML files up to 32MB. To change the file size, use this occ command:

./occ config:app:set htmlviewer maxSize --value=SizeInMegabyte

Iframe Permissions

The app automatically configures the iframe with an CSP for supported browsers and a sandbox to limit code execution and data access. Both policies can be changed through config settings with the OCC commands shown below. Please be aware that the general CSP of your Nextcloud may still block some access regardless of what CSP and sandbox settings you configure.

To change the CSP or sandbox settings, use these occ commands:

./occ config:app:set htmlviewer csp --value=CustomCspSettings
./occ config:app:set htmlviewer sandbox --value=CustomSandboxSettings

nextcloud-htmlviewer's People

Contributors

marius-wieschollek avatar

Watchers

Paul avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.