mirror of
https://git.zx2c4.com/cgit
synced 2025-06-23 18:28:40 +02:00
Don't hardcode urls when SCRIPT_NAME is available
Also, let the makefile define the name of the installed cgi and use that definition as a default value for cgit_script_name variable. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
This commit is contained in:
parent
6fb7d09fea
commit
ea2831f1c8
5 changed files with 9 additions and 4 deletions
2
cgit.c
2
cgit.c
|
@ -244,6 +244,8 @@ int main(int argc, const char **argv)
|
|||
cgit_repolist.repos = NULL;
|
||||
|
||||
cgit_read_config(CGIT_CONFIG, cgit_global_config_cb);
|
||||
if (getenv("SCRIPT_NAME"))
|
||||
cgit_script_name = xstrdup(getenv("SCRIPT_NAME"));
|
||||
if (getenv("QUERY_STRING"))
|
||||
cgit_querystring = xstrdup(getenv("QUERY_STRING"));
|
||||
cgit_parse_args(argc, argv);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue