Skip to content

Instantly share code, notes, and snippets.

View JulioTalavera's full-sized avatar

Julio Talavera JulioTalavera

  • Gray Jedi Academy
View GitHub Profile
@JulioTalavera
JulioTalavera / nginx.conf
Created May 9, 2019 15:22 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@JulioTalavera
JulioTalavera / go_lang_mux_cors
Last active October 31, 2019 03:50
Go Lang Mux CORS
var router *mux.Router
router = mux.NewRouter().StrictSlash(true)
router.Use(mux.CORSMethodMiddleware(router))
router.Headers("Access-Control-Allow-Origin", "*")
router.Headers("Content-Type", "application/json; charset=utf-8;")
router.Headers("X-Requested-With", "*")
router.Headers("Access-Control-Allow-Headers", "Origin,Content-Type,Accept")