Socket
Book a DemoInstallSign in
Socket

localhost

Package Overview
Dependencies
Maintainers
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

localhost

1.4.2
bundlerRubygems
Version published
Maintainers
11
Created
Source

Localhost

This gem provides a convenient API for generating per-user self-signed root certificates.

Development Status

Motivation

HTTP/2 requires SSL in web browsers. If you want to use HTTP/2 for development (and you should), you need to start using URLs like https://localhost:8080. In most cases, this requires adding a self-signed certificate to your certificate store (e.g. Keychain on macOS), and storing the private key for the web-server to use.

I wanted to provide a server-agnostic way of doing this, primarily because I think it makes sense to minimise the amount of junky self-signed keys you add to your certificate store for localhost.

Usage

Please see the project documentation for more details.

  • Getting Started - This guide explains how to use localhost for provisioning local TLS certificates for development.

  • Browser Configuration - This guide explains how to configure your local browser in order to avoid warnings about insecure self-signed certificates.

  • Example Server - This guide demonstrates how to use Localhost::Authority to implement a simple HTTPS client & server.

Releases

Please see the project releases for all releases.

v1.4.0

  • Add localhost:purge to delete all certificates.
  • Add localhost:install to install the issuer certificate in the local trust store.

See Also

  • Falcon — Uses Localhost::Authority to provide HTTP/2 with minimal configuration.
  • Puma — Supports Localhost::Authority to provide self-signed HTTP for local development.

Contributing

We welcome contributions to this project.

  • Fork it.
  • Create your feature branch (git checkout -b my-new-feature).
  • Commit your changes (git commit -am 'Add some feature').
  • Push to the branch (git push origin my-new-feature).
  • Create new Pull Request.

Developer Certificate of Origin

In order to protect users of this project, we require all contributors to comply with the Developer Certificate of Origin. This ensures that all contributions are properly licensed and attributed.

Community Guidelines

This project is best served by a collaborative and respectful environment. Treat each other professionally, respect differing viewpoints, and engage constructively. Harassment, discrimination, or harmful behavior is not tolerated. Communicate clearly, listen actively, and support one another. If any issues arise, please inform the project maintainers.

FAQs

Package last updated on 25 Mar 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.