[patch] Use localhost, not 127.0.0.1, to avoid IPv4 only setup

Thomas Sødring thomas.sodring at hioa.no
Fri Dec 2 13:18:24 CET 2016


Hi Petter,

Thanks for the patch. I did a search and there was 20 occurences of
127.0.0.1 (including comments) so I did a project-wide search/replace
and have pushed a commit replacing them with localhost.

 - Tom


On 12/02/2016 10:45 AM, Petter Reinholdtsen wrote:
> The yaml setup files uses 127.0.0.1 as the server address.  This lock
> the setup to IPv4 only.  I suggest we change them to use 'localhost'
> instead, which will map to 127.0.0.1 or ::1 depending on the content in
> /etc/hosts and make sure the application have higher chance of working
> with IPv6 only machines.  Does this change look good to you?
>
> diff --git a/core-webapp/src/main/resources/application-demo.yml b/core-webapp/src/main/resources/application-demo.yml
> index bfb62a1..68bd508 100644
> --- a/core-webapp/src/main/resources/application-demo.yml
> +++ b/core-webapp/src/main/resources/application-demo.yml
> @@ -61,7 +61,7 @@ spring:
>  server:
>      contextPath: /noark5v4
>      port: 8092
> -    address: 127.0.0.1
> +    address: localhost
>  management:
>      context-path: /management
>  info:
> diff --git a/core-webapp/src/main/resources/application-dev.yml b/core-webapp/src/main/resources/application-dev.yml
> index 05a92d6..0bcef1a 100644
> --- a/core-webapp/src/main/resources/application-dev.yml
> +++ b/core-webapp/src/main/resources/application-dev.yml
> @@ -108,7 +108,7 @@ nikita-noark5-core:
>      server:
>           name: nikita.hioa.no
>           port: 8092
> -         address: 127.0.0.1
> +         address: localhost
>      details:
>          conformity-levels:
>              official: arkivstruktur, sakarkiv
> diff --git a/core-webapp/src/main/resources/application-prod.yml b/core-webapp/src/main/resources/application-prod.yml
> index 7677b9c..f5c77a1 100644
> --- a/core-webapp/src/main/resources/application-prod.yml
> +++ b/core-webapp/src/main/resources/application-prod.yml
> @@ -95,8 +95,8 @@ nikita-noark5-core:
>      server:
>           name: nikita.hioa.no
>           port: 8092
> -         address: 127.0.0.1
> +         address: localhost
>      details:
>          conformity-levels:
>              official: arkivstruktur, sakarkiv
> -            non-official: api, gui # import (mass) should be here
> \ No newline at end of file
> +            non-official: api, gui # import (mass) should be here
> diff --git a/core-webapp/src/main/resources/application-test.yml b/core-webapp/src/main/resources/application-test.yml
> index db61658..7ce4af6 100644
> --- a/core-webapp/src/main/resources/application-test.yml
> +++ b/core-webapp/src/main/resources/application-test.yml
> @@ -106,7 +106,7 @@ nikita-noark5-core:
>      server:
>           name: nikita.hioa.no
>           port: 8092
> -         address: 127.0.0.1
> +         address: localhost
>      details:
>          conformity-levels:
>              official: arkivstruktur, sakarkiv
> diff --git a/core-webapp/src/main/resources/application.yml b/core-webapp/src/main/resources/application.yml
> index fbd5ad4..f930b09 100644
> --- a/core-webapp/src/main/resources/application.yml
> +++ b/core-webapp/src/main/resources/application.yml
> @@ -123,7 +123,7 @@ nikita-noark5-core:
>      server:
>           name: nikita.hioa.no
>           port: 8092
> -         address: 127.0.0.1
> +         address: localhost
>           protocol: http # or https
>      details:
>          conformity-levels:
>



More information about the nikita-noark mailing list