If your nginx doesn't have the necessary module by default, or is using v2 instead, find your own guide.
If you use cloudflare, please read [these](https://support.cloudflare.com/hc/en-us/articles/200170786-Restoring-original-visitor-IPs-Logging-visitor-IP-addresses-with-mod-cloudflare-) [articles](https://support.cloudflare.com/hc/en-us/articles/200168236-Configuring-Cloudflare-IP-Geolocation) to setup proper IP forwarding and geolocation headers. Similar steps would apply to other CDNs/reverse proxies.
There are also 2 config entries in configs/main.js, `ipHeader` and `countryCodeHeader` that you can tweak for jschan to use different headers for country code or real visitor IP.
Also included is an "nginx_advanced" config, and a snippets folder for advanced users who want to better organise and more easily customise the nginx configuration. It functions the same as the normal nginx.example, but you need to create the snippets folder in /etc/nginx/snippets, and copy the example snippets.
@ -115,7 +114,7 @@ Also included is an "nginx_advanced" config, and a snippets folder for advanced
#install dependencies again in case any have updated or changed
$ npm install
#diff the config files to see if anything changed and edit accordingly. OR backup your config, replace it with the fresh example, and update it with whatever settings you want to keep from your backup.
//commented out for now, because we cant add a manual ban based on a non existing hash suffix (or fetch the full hash from a non existing post), and the user wouldnt know if it the post didn't exist so its pointless anyway.
//router.post('/global/addban', geoAndTor, torPreBypassCheck, processIp, useSession, sessionRefresh, csrf, calcPerms, isLoggedIn, hasPerms(1), paramConverter, addBanController); //add ban manually without post
router.post('/global/deleteboard',useSession,sessionRefresh,csrf,paramConverter,calcPerms,isLoggedIn,hasPerms(Math.min(deleteBoardPermLevel,1)),deleteBoardController);//delete board from global management panel
router.post('/global/deleteboard',useSession,sessionRefresh,csrf,paramConverter,calcPerms,isLoggedIn,hasPerms(1),deleteBoardController);//delete board from global management panel
router.post('/global/addnews',useSession,sessionRefresh,csrf,calcPerms,isLoggedIn,hasPerms(0),addNewsController);//add new newspost
router.post('/global/editnews',useSession,sessionRefresh,csrf,calcPerms,isLoggedIn,hasPerms(0),paramConverter,editNewsController);//add new newspost
{result:numberBody(req.body.captcha_options_grid_icon_y_offset,0,50),expected:false,error:'Captcha options icon y offset must be a number from 0-50'},
{result:numberBody(req.body.captcha_options_num_distorts_min,0,10),expected:false,error:'Captcha options min distorts must be a number from 0-10'},
{result:numberBody(req.body.captcha_options_num_distorts_max,0,10),expected:false,error:'Captcha options max distorts must be a number from 0-10'},
{result:minmaxBody(req.body.captcha_options_num_distorts_min,req.body.captcha_options_num_distorts_max),expected:false,error:'Captcha options distorts min must be less than max'},
{result:minmaxBody(req.body.captcha_options_num_distorts_min,req.body.captcha_options_num_distorts_max),expected:true,error:'Captcha options distorts min must be less than max'},
{result:numberBody(req.body.captcha_options_distortion,0,50),expected:false,error:'Captcha options distortion must be a number from 0-50'},