Re: [cgit PATCH] use Host: header to generate cgit_hosturl

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Sep 1, 2008 at 8:30 AM, Eric Wong <normalperson@xxxxxxxx> wrote:
> I run an instance of lighttpd for cgit behind nginx (nginx
> doesn't execute CGI).  So the port (SERVER_PORT=33333) that
> lighttpd runs on sends to cgit is different from the standard
> port 80 that public clients connect to (via nginx).
>
> This was causing the Atom feed URL to show the private port
> number that lighttpd was running on.
>
> Since the HTTP/1.1 "Host" header includes the port number if
> running on a non-standard port, it allows non-client-facing HTTP
> servers to transparently generate public URLs that clients can
> see.

This makes a lot of sense, thanks for the detailed description.


> So use the "Host" header if it is available and fall back to
> SERVER_NAME/SERVER_PORT for some clients that don't set
> HTTP_HOST.

Maybe it would be better to use a new cgitrc parameter as fallback if
the client doesn't provide the "Host" header?

--
larsh
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux