Skip to content
This repository has been archived by the owner on Jan 24, 2021. It is now read-only.

503 Response when RewriteLocalhost=false #2925

Closed
4 tasks
klym1 opened this issue Aug 28, 2018 · 2 comments
Closed
4 tasks

503 Response when RewriteLocalhost=false #2925

klym1 opened this issue Aug 28, 2018 · 2 comments

Comments

@klym1
Copy link

klym1 commented Aug 28, 2018

Prerequisites

  • I have written a descriptive issue title
  • I have verified that I am running the latest version of Nancy
  • I have verified if the problem exist in both DEBUG and RELEASE mode
  • I have searched open and closed issues to ensure it has not already been reported

Description

Trying to run self-hosted Nancy with RewriteLocalhost=false:

_host = new NancyHost(new Uri("http://localhost:4444/"), 
 new HostBootstrapper(), 
 new HostConfiguration
             {
                 RewriteLocalhost = false
             });
_host.Start();

But it doesn't work, when I try to send some request it always responses with 503 Status:

GET / HTTP/1.1
Host: localhost:4444
User-Agent: insomnia/6.0.2
Accept: */*

HTTP/1.1 503 Service Unavailable
Content-Type: text/html; charset=us-ascii
Server: Microsoft-HTTPAPI/2.0
Date: Tue, 28 Aug 2018 16:40:50 GMT
Connection: close
Content-Length: 326

I don't want Nancy to listen on http://+:4444/ but simply on the IP I provide.

System Configuration

  • Nancy self-hosted
  • Nancy 1.4.4.0, Nancy.Hosting.Self 1.4.1.0
  • Windows 10 x64
  • .Net 4.7.1
@klym1 klym1 changed the title 503 Response when RewriteLocalhost=true 503 Response when RewriteLocalhost=false Aug 28, 2018
@cloudhunter89
Copy link

cloudhunter89 commented Aug 28, 2018 via email

@klym1
Copy link
Author

klym1 commented Aug 28, 2018

@cloudhunter89 Thanks for the answer. Yes, indeed, previously Nancy host was usually started with default RewriteLocalHost value (which is true). Who would expect that 503 is returned by OS!
Removing the reservation has fixed the problem.

@klym1 klym1 closed this as completed Dec 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants