Secure is an HTTP middleware for Go that facilitates some quick security wins. It's a standard net/http Handler, and can be used with many frameworks or directly with Go's net/http package. Be sure to include the Secure middleware as close to the top (beginning) as possible (but after logging and recovery). It's best to do the allowed hosts and SSL check before anything else. When IsDevelopment is true, the AllowedHosts, SSLRedirect, STS header, and HPKP header will not be in effect. This allows you to work in development/test mode and not have any annoying redirects to HTTPS (ie. development can happen on HTTP), or block localhost has a bad host. Secure comes with a variety of configuration options. Secure allows you to set a custom function for the AllowRequestFunc option. You can use this function as a custom filter to allow the request to continue or simply reject it.

Features

  • Facilitates some quick security wins
  • It's a standard net/http Handler
  • Can be used with many frameworks or directly with Go's net/http package
  • Secure comes with a variety of configuration options
  • Set the IsDevelopment option to true when developing
  • Allow Request Function
  • Redirect HTTP to HTTPS

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow Secure

Secure Web Site

Other Useful Business Software
AestheticsPro Medical Spa Software Icon
AestheticsPro Medical Spa Software

Our new software release will dramatically improve your medspa business performance while enhancing the customer experience

AestheticsPro is the most complete Aesthetics Software on the market today. HIPAA Cloud Compliant with electronic charting, integrated POS, targeted marketing and results driven reporting; AestheticsPro delivers the tools you need to manage your medical spa business. It is our mission To Provide an All-in-One Cutting Edge Software to the Aesthetics Industry.
Learn More
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Secure!

Additional Project Details

Operating Systems

Linux, Mac, Windows

Programming Language

Go

Registered

2023-01-24