Skip to content

Instantly share code, notes, and snippets.


Nicky Toh nickytoh

View GitHub Profile
nickytoh / nginx.conf
Created Apr 20, 2018 — forked from nrollr/nginx.conf
NGINX config for SSL with Let's Encrypt certs
View nginx.conf
# Advanced config for NGINX
server_tokens off;
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options nosniff;
# Redirect all HTTP traffic to HTTPS
server {
listen 80;
return 301 https://$host$request_uri;
View proxy_with_balance_file.js
var fs = require('fs'),
sys = require('sys'),
http = require('http');
http.createServer(function (req, res) {
checkBalanceFile(req, res);
function checkBalanceFile(req, res) {
fs.stat("balance", function(err) {