Commit 44f9caa5 authored by Yuanle Song's avatar Yuanle Song
Browse files

v1.1.0 do not return 404 on HEAD /

parent e8bb0b84
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@ import Data.Text.Lazy (Text)
import qualified Data.Text.Lazy as L
import Text.Read (readMaybe)
import System.Environment (lookupEnv)
import Network.HTTP.Types (StdMethod(HEAD))
import Web.Scotty

getClientIP1 :: ActionM (Maybe Text)
@@ -51,3 +52,4 @@ main = do
  port <- getListenPort
  scotty port $ do
    get "/" getClientIP
    addroute HEAD "/" $ return ()

Makefile

deleted100644 → 0
+0 −7
Original line number Diff line number Diff line
LOCAL_FILE=./.stack-work/install/x86_64-linux/lts-3.0/7.10.2/bin/get-client-ip
HOST=de01
update:
	stack clean
	stack build
	rsync -air $(LOCAL_FILE) $(HOST):/usr/local/bin/
.PHONY: update
+2 −1
Original line number Diff line number Diff line
name:          get-client-ip
version:       1.0.0
version:       1.1.0
cabal-version: >= 1.8
build-type:    Simple

@@ -11,3 +11,4 @@ executable get-client-ip
    build-depends:  base   >= 4      && < 5
                  , scotty
                  , text
                  , http-types