Closed andythorne closed 2 years ago
Hello @andythorne! Thanks for opening the issue and thanks for using it :)
I see the issue..
but if i recon the issue from the past we added an environment env SEVER_HOSTNAME
where you can define the host name, if not set the standalone server will return the ip, as your debug shows.
docker run --rm --env SERVER_PORT=80 --env SERVER_HOSTNAME=oauth2 -p80:80 --expose 80 ghcr.io/navikt/mock-oauth2-server:0.5.1
docker run --network localnet --rm --env SERVER_PORT=80 --env SERVER_HOSTNAME=oauth2 -p80:80 --expose 80 --hostname oauth2 ghcr.io/navikt/mock-oauth2-server:0.5.1
update, tried it locally and it seems to crash.. need some more investigation.
@andythorne have you tried to use --ipv4
flag on curl? or without the -H 'Host: oauth2'
?
no response, closing it for now. please feel free to reopen if the issue remains.
I'm seeing some strange behaviour affecting the issues url. When setting the host name to a name that does not contain a port, the issuer url seems to be set to the IP. When any port is included in the header, it uses the port on the supplied host (as you would expect).
Using:
Using
oauth2:80
, the issuer url is resolved tooauth2
:Using the host of the container
oauth2
, the issuer url is the host name of the client (in this case, the curl container):I would expect that specifying the host with no port would produce an Issuer Url of that host!