Security News
The Push to Ban Ransom Payments Is Gaining Momentum
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
cms-module-client
Advanced tools
Readme
An editor for html pages. This is the client side part of the JS CMS module tool. It lets you edit a webpage in a WYSIWYG way. Together with the server side module, it creates nicely integrated content management system for Node JS.
To install this package, simply run:
npm install cms-module-client
Once installed, you need import it into your project and create an instance of the CMS class. Then, you simply have to call the cms.run()
method. This will assign editable tags and render a toolbar containing editing options.
import CMS from "cms-module-client";
const cms = new CMS();
cms.run();
As you probably noticed, the package uses import syntax, which means that you need a javascript bundler of some sort. Webpack is recommended, but other bundlers are also available.
As you would expect, when using a CMS system, security is a very important component. It should not be possibly for ordinary users to access the CMS editor or successfully make a request to the CMS endpoints. It is therefore strongly recommended that you have some kind of login system for administrators when using this module. The authnetication of users is not handled what so ever in the module, this responsibility is completely on you, as the developer of the service or website, to implement.
On the client, a simple way of athentication would be to specify the auth option in the CMS class to be the current session id.
Like so:
import CMS from "cms-module-client";
import { readCookie } from "./util";
const sessId = readCookie("SESSION_ID");
const cms = new CMS({ auth: sessId });
cms.run();
The value specified in the auth option will be sent as an Authorization
header. This can then be used on the server to check the authorization status of the user sending the save request.
FAQs
An editor for html pages. This is the client side part of the JS CMS module tool. It lets you edit a webpage in a WYSIWYG way. Together with the Server side module, it creates nicely integrated content management system for Node JS.
We found that cms-module-client demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
Application Security
New SEC disclosure rules aim to enforce timely cyber incident reporting, but fear of job loss and inadequate resources lead to significant underreporting.
Security News
The Python Software Foundation has secured a 5-year sponsorship from Fastly that supports PSF's activities and events, most notably the security and reliability of the Python Package Index (PyPI).