mirror of
https://github.com/omar-polo/gmid.git
synced 2024-09-27 21:11:51 +02:00
reject non-gemini protocols with 53
This commit is contained in:
parent
6a9ae70773
commit
7b1d979032
@ -1,6 +1,7 @@
|
||||
2021-01-11 Omar Polo <op@omarpolo.com>
|
||||
|
||||
* gmid.c (main): ipv6 disabled by default and -6 flag to enable it
|
||||
(handle): reject non-gemini protocols with 53
|
||||
|
||||
2021-01-10 Omar Polo <op@omarpolo.com>
|
||||
|
||||
|
7
gmid.c
7
gmid.c
@ -600,6 +600,13 @@ handle(struct pollfd *fds, struct client *client)
|
||||
return;
|
||||
}
|
||||
|
||||
if (strcmp(iri.schema, "gemini")) {
|
||||
if (!start_reply(fds, client, PROXY_REFUSED, "won't proxy request"))
|
||||
return;
|
||||
goodbye(fds, client);
|
||||
return;
|
||||
}
|
||||
|
||||
LOGI(client, "GET %s%s%s",
|
||||
*iri.path ? iri.path : "/",
|
||||
*iri.query ? "?" : "",
|
||||
|
Loading…
Reference in New Issue
Block a user