
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
redux-http-status
Advanced tools
Redux reducer and action to set http status in the store for use server side. Comes with bundled react components
This library provides a simple http status handling when using react, redux, react-redux, react-router and react-router-redux.
It's composed of :
import { httpStatusReducer } from 'redux-http-status'
export default combineReducers({
...otherReducers,
status: httpStatusReducer,
})
import { NotFound } from 'redux-http-status'
export default function NotFoundPage() {
return (
<NotFound>
This page was not found
</NotFound>
)
}
Which works like NotFound
<Route
path="/old/date"
component={() => <Redirect code={301} url="/date" />}
/>
To make it work server side, here's a Koa exemple that renders an App, sets the status and redirect if needed.:
koaze.router.get('/*', ctx => {
const history = createMemoryHistory({ initialEntries: [ctx.url] })
const store = createStore(
reducers,
compose(applyMiddleware(routerMiddleware(history), thunk))
)
// Render app
const app = renderToString(
<Root store={store} history={history}>
<App />
</Root>
)
// Get status from redux store
const { status } = store.getState()
ctx.status = status.code
if ([301, 302].includes(status.code)) {
ctx.redirect(status.url)
return
}
ctx.type = 'text/html'
ctx.body = renderHtml(app, store)
})
FAQs
Redux reducer and action to set http status in the store for use server side. Comes with bundled react components
We found that redux-http-status 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.