aboutsummaryrefslogtreecommitdiff
path: root/gmid.c
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2021-12-29 20:36:54 +0000
committerOmar Polo <op@omarpolo.com>2021-12-29 20:36:54 +0000
commit72b033ef18ae3f82922f6f11ce0f5194e95f667d (patch)
tree5f06b0c70851aa17f17251579adb65a66a8081ca /gmid.c
parent054387bb26e75cef12e8dc0f531e7ee42614edd7 (diff)
add ability to proxy requests
Add to gmid the ability to forwad a request to another gemini server and thus acting like a reverse proxy. The current syntax for the config file is server "example.com" { ... proxy relay-to host:port } Further options (like the use of custom certificates) are planned. cf. github issue #7
Diffstat (limited to 'gmid.c')
-rw-r--r--gmid.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gmid.c b/gmid.c
index e0c777a..7c2c7bd 100644
--- a/gmid.c
+++ b/gmid.c
@@ -302,6 +302,8 @@ free_config(void)
free((char*)l->block_fmt);
free((char*)l->dir);
+ free(l->proxy_host);
+
if (l->dirfd != -1)
close(l->dirfd);