https://github.com/hirocaster/phoenix_cowboy_remove_server_header
Remove `server: Cowboy` in http headers from Phoenix
https://github.com/hirocaster/phoenix_cowboy_remove_server_header
cowboy header http phoenix
Last synced: 10 months ago
JSON representation
Remove `server: Cowboy` in http headers from Phoenix
- Host: GitHub
- URL: https://github.com/hirocaster/phoenix_cowboy_remove_server_header
- Owner: hirocaster
- Created: 2017-04-11T15:26:28.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-12T14:06:31.000Z (almost 9 years ago)
- Last Synced: 2025-03-26T04:41:21.988Z (11 months ago)
- Topics: cowboy, header, http, phoenix
- Language: Elixir
- Homepage:
- Size: 5.86 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PhoenixCowboyRemoveServerHeader
[](https://circleci.com/gh/hirocaster/phoenix_cowboy_remove_server_header)
Remove `server: Cowboy` in http headers from [Phoenix](http://www.phoenixframework.org/).
```
HTTP/1.1 200 OK
server: Cowboy <--- Will remove by this module !!
date: Tue, 11 Apr 2017 15:18:46 GMT
content-length: 1933
content-type: text/html; charset=utf-8
```
## Usage
``` elixir
defmodule MyApp do
use Application
def start(_type, _args) do
import Supervisor.Spec
PhoenixCowboyRemoveServerHeader.enable_for(:my_app, __MODULE__.Endpoint) # Add in your app
```
## Installation
If [available in Hex](https://hex.pm/docs/publish), the package can be installed as:
1. Add `phoenix_cowboy_remove_server_header` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[{:phoenix_cowboy_remove_server_header, "~> 0.1.0"}]
end
```
2. Ensure `phoenix_cowboy_remove_server_header` is started before your application:
```elixir
def application do
[applications: [:phoenix_cowboy_remove_server_header]]
end
```