DDoS protection - Using Netfilter/iptables @ DevConf.cz Feb 2014
- Disable TCP loose mode
- Disable TCP forwarding
- Enable SYN cookies
- Enable TCP timestamping
- Use SYNPROXY module (Optional)
/etc/sysctl.conf
const { DataTypes } = require('sequelize'); | |
const ApplicationRecord = require('./application-record'); | |
const Foo = require('./foo'); | |
const Boo = ApplicationRecord.define('Boo', { | |
fooId: DataTypes.INTEGER, | |
booName: DataTypes.STRING | |
}, {}); |
const testExpressModule = require('./test-express-module'); | |
module.exports = (req, res) => { | |
res.json({ path: '/bar', testExpressModule }); | |
}; |
export const scheduleEpic = action$ => action$.pipe( | |
ofType(FETCH_SCHEDULE_REQUEST), | |
debounceTime(300), | |
switchMap(({ payload }) => ( | |
ajax.getJSON(`${API_URL}/AvailableSeatStatusList/${payload.OriginStationID}`).pipe( | |
map(response => ({ | |
...payload, | |
availableSeatTable: availableFormater(response[0], payload.DestinationStationID), | |
})), | |
catchError(error => of({ |
export const scheduleEpic = action$ => action$.pipe( | |
ofType(FETCH_SCHEDULE_REQUEST), | |
debounceTime(300), | |
switchMap(({ payload }) => { | |
return ajax | |
.getJSON(`${API_URL}/AvailableSeatStatusList/${payload.OriginStationID}`) | |
.pipe( | |
map(response => ({ | |
...payload, | |
availableSeatTable: availableFormater(response[0], payload.DestinationStationID), |
*raw | |
:PREROUTING ACCEPT [0:0] | |
:OUTPUT ACCEPT [0:0] | |
-A PREROUTING -p tcp -m tcp --dport 25565 -j CT --notrack | |
COMMIT | |
*mangle | |
:PREROUTING ACCEPT [0:0] | |
:INPUT ACCEPT [0:0] |
/etc/sysctl.conf
import configureMockStore from 'redux-mock-store'; | |
import middleware from './middleware'; | |
import actions, { types } from './actions'; | |
describe('test middleware behavior', () => { | |
// Mock jQuery. | |
class jQuery { | |
constructor(selector, context) { } | |
html() { } |
<script src="/js/actions.js"></script> | |
<script src="/js/reducers.js"></script> | |
<script src="/js/middleware.js"></script> | |
<script> | |
const store = Redux.createStore( | |
reducers(actions.types, Redux), | |
window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__(), | |
Redux.applyMiddleware( | |
middleware.default(actions.types, actions.default, $), | |
), |
(function (global, factory) { | |
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : | |
typeof define === 'function' && define.amd ? define(['exports'], factory) : | |
(factory((global.middleware = global.middleware || {}))); | |
}(this, (function (exports) { | |
'use strict'; | |
/** | |
* Middleware | |
*/ |
(function (global, factory) { | |
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : | |
typeof define === 'function' && define.amd ? define(['exports'], factory) : | |
(factory((global.actions = global.actions || {}))); | |
}(this, (function (exports) { | |
'use strict'; | |
/** | |
* Action types | |
*/ |