Skip to content

Commit 6702d7e

Browse files
committed
Merge pull request #497 from jekor/master
support safeLink for RemoteHost
2 parents 3ae3e43 + 70d2cca commit 6702d7e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

servant/src/Servant/Utils/Links.hs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ import Servant.API.Capture ( Capture )
116116
import Servant.API.ReqBody ( ReqBody )
117117
import Servant.API.QueryParam ( QueryParam, QueryParams, QueryFlag )
118118
import Servant.API.Header ( Header )
119+
import Servant.API.RemoteHost ( RemoteHost )
119120
import Servant.API.Verbs ( Verb )
120121
import Servant.API.Sub ( type (:>) )
121122
import Servant.API.Raw ( Raw )
@@ -292,6 +293,10 @@ instance HasLink sub => HasLink (Header sym a :> sub) where
292293
type MkLink (Header sym a :> sub) = MkLink sub
293294
toLink _ = toLink (Proxy :: Proxy sub)
294295

296+
instance HasLink sub => HasLink (RemoteHost :> sub) where
297+
type MkLink (RemoteHost :> sub) = MkLink sub
298+
toLink _ = toLink (Proxy :: Proxy sub)
299+
295300
-- Verb (terminal) instances
296301
instance HasLink (Verb m s ct a) where
297302
type MkLink (Verb m s ct a) = URI

0 commit comments

Comments
 (0)