mirror of
https://git.zx2c4.com/cgit
synced 2025-07-30 23:55:28 +02:00
Add support for environment variable expansion
This patch teaches cgit to expand environment variables in certain cgitrc option values (cache_root, scan-path, include) plus when finding the location of cgitrc itself. One use case for this feature is virtual hosting - e.g. by setting $CGIT_CONFIG='/etc/cgitrc/$HTTP_HOST' in httpd.conf, all virtual hosts automatically gets their own cgitrc. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
This commit is contained in:
parent
ff3a3b4e2b
commit
ba56a37e86
3 changed files with 78 additions and 5 deletions
2
cgit.h
2
cgit.h
|
@ -296,4 +296,6 @@ extern int cgit_close_filter(struct cgit_filter *filter);
|
|||
|
||||
extern int readfile(const char *path, char **buf, size_t *size);
|
||||
|
||||
extern char *expand_macros(const char *txt);
|
||||
|
||||
#endif /* CGIT_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue