[ 
https://issues.apache.org/jira/browse/CAMEL-10813?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15867582#comment-15867582
 ] 

ASF GitHub Bot commented on CAMEL-10813:
----------------------------------------

GitHub user godbolerr opened a pull request:

    https://github.com/apache/camel/pull/1466

    CAMEL-10813: Host address in the rest configuration is now taken care…

    Host address is now taken care of during server creation when it is given 
otherwise default behavior remains. 

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/godbolerr/camel master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/camel/pull/1466.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1466
    
----
commit 81d604d5514c0ac227c82c9c84412e0def53a2e3
Author: admin <[email protected]>
Date:   2017-02-15T10:07:20Z

    CAMEL-10813: Host address in the rest configuration is now taken care of 
when creating a Restlet Server

----


> Host address ignored when creating a Restlet Server
> ---------------------------------------------------
>
>                 Key: CAMEL-10813
>                 URL: https://issues.apache.org/jira/browse/CAMEL-10813
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-restlet
>            Reporter: Ludek Stepan
>            Priority: Minor
>
> The RestConfigurationDefinition allows a "host" to be specified while 
> configuring the RouteBuilder. Unfortunately, the host is ignored while the 
> Restlet Server is created. As a result, the server will always listen on all 
> network interfaces.
> We would like to have Camel listening only on the local loopback interface 
> for security reasons.
> Example of our code in the the RouteBuilder:
> {code:xml}
> public void configure() throws Exception {
>       restConfiguration()
>               .component("restlet")
>               .port(8103)
>               .host("127.0.0.1");
> // ...
> {code}
> The debug log:
> {noformat}
> org.apache.camel.component.restlet.RestletConsumer [DefaultConsumer.java:144] 
> Starting consumer: 
> Consumer[http://127.0.0.1:8103/api/status?restletMethods=GET]
> org.apache.camel.component.restlet.RestletComponent 
> [RestletComponent.java:392] Setting parameters: [] to server: 
> org.restlet.Server@e042c99
> org.apache.camel.component.restlet.RestletComponent 
> [RestletComponent.java:396] Added server: 127.0.0.1:8103
> org.restlet.Component.Server [Slf4jLogger.java:132] Starting the internal 
> [HTTP/1.1] server on port 8103
> {noformat}
> I believe the problem is caused by following line which ignores the host 
> parameter:
> [https://github.com/apache/camel/blob/master/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletComponent.java#L282]



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to