[
https://issues.apache.org/jira/browse/FINERACT-1502?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17584679#comment-17584679
]
Davies Tobi Alex commented on FINERACT-1502:
--------------------------------------------
[~francisguchie] and [~awasum] so this fix has already been applied and
merged, so please you can close the issue I raised on FINERACT-1683
> To support Webhooks with all paths instead of only absolute path
> ----------------------------------------------------------------
>
> Key: FINERACT-1502
> URL: https://issues.apache.org/jira/browse/FINERACT-1502
> Project: Apache Fineract
> Issue Type: Bug
> Reporter: Sandeep
> Assignee: Sandeep
> Priority: Major
> Fix For: 1.7.0
>
> Attachments: WebhookAPICallUpdatesURL.png
>
>
> Current Implementation supports Webhook URL with absolute path like
> [https://www.hostname.com|https://www.hostname.com/] but it does not support
> urls like [https://www.hostname.com/v1/api/webhook/] or
> [https://www.hostname.com/webhook/]
> *Currently Webhook URLs working* : Only AbsoluteUrls as baseURL
> ([http://www.hostname.com/])
> *URLs Not working* : Relative Paths in baseURL like
> [http://www.hostname.com/v1/api/webhook]
> *Root Cause :* This problem is happening due to retrofit2 library as it
> removes relative path from baseURL due to "/" present in request like
> Get("/") , POST("/") etc. So it updates
> [http://www.hostname.com/v1/api/webhook] to [http://www.hostname.com/] while
> making API call and hence we get 404 error.
> Please refer attached screenshots for same where i printed baseURL in logs,
> So baseURL was updated during api call and hence it is resulting in 404 error
> *Resolution* :
> So in order to support absolute url as well as all other relative URL Paths,
> I updated Webhook Service Code and replaced GET("/") by GET(".") So that
> retrofit2 library does not remove anything from baseURL. I tested code and it
> is working fine with both kind of URLs.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)