File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
cardano-db-sync/src/Cardano/DbSync/OffChain Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -207,16 +207,19 @@ isPossiblyJsonObject bs =
207207-------------------------------------------------------------------------------------
208208parseOffChainUrl :: OffChainUrlType -> ExceptT OffChainFetchError IO Http. Request
209209parseOffChainUrl url =
210- handleExceptT wrapHttpException $ applyContentType <$> Http. parseRequest (showUrl url)
210+ handleExceptT wrapHttpException $ applyHeaders <$> Http. parseRequest (showUrl url)
211211 where
212212 wrapHttpException :: HttpException -> OffChainFetchError
213213 wrapHttpException err = OCFErrHttpException url (textShow err)
214214
215- applyContentType :: Http. Request -> Http. Request
216- applyContentType req =
215+ applyHeaders :: Http. Request -> Http. Request
216+ applyHeaders req =
217217 req
218218 { Http. requestHeaders =
219- Http. requestHeaders req ++ [(CI. mk " content-type" , " application/json" )]
219+ Http. requestHeaders req
220+ ++ [ (CI. mk " content-type" , " application/json" )
221+ , (CI. mk " user-agent" , " cardano-db-sync" )
222+ ]
220223 }
221224
222225-------------------------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments