Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@mashroom/mashroom-browser-cache
Advanced tools
Plugin for Mashroom Server, a Integration Platform for Microfrontends.
This plugin adds a Service to manage cache control headers. It allows to disable the cache globally.
If node_modules/@mashroom is configured as plugin path just add @mashroom/mashroom-browser-cache as dependency.
After that you can use the service like this:
// @flow
import type {MashroomCacheControlService} from '@mashroom/mashroom-browser-cache/type-definitions';
export default async (req: ExpressRequest, res: ExpressResponse) => {
const cacheControlService: MashroomCacheControlService = req.pluginContext.services.browserCache.cacheControl;
await cacheControlService.addCacheControlHeader(req, res);
// ..
};
You can override the default config in your Mashroom config file like this:
{
"plugins": {
"Mashroom Cache Control Services": {
"disabled": false,
"disabledWhenAuthenticated": false,
"maxAgeSec": 1800
}
}
}
The Cache Control service is accessible through pluginContext.services.browserCache.cacheControl
Interface:
export interface MashroomCacheControlService {
/**
* Add the Cache-Control header based on the settings and authentication status
*/
addCacheControlHeader(request: ExpressRequest, response: ExpressResponse): Promise<void>;
/**
* Remove a previously set Cache-Control header
*/
removeCacheControlHeader(response: ExpressResponse): void;
}
1.3.1 (February 8, 2020)
FAQs
Mashroom services to control browser caching
The npm package @mashroom/mashroom-browser-cache receives a total of 4 weekly downloads. As such, @mashroom/mashroom-browser-cache popularity was classified as not popular.
We found that @mashroom/mashroom-browser-cache demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.