Remove old redirect code

FossilOrigin-Name: ba4ac71bb492d3d8e4a2f2e1b8072cbba95adeeb9fa4c1884daa22c04aff01bf
This commit is contained in:
me@ow.nekobit.net 2022-04-04 02:17:11 +00:00
parent 2552e13068
commit 4a74749b63

View file

@ -75,9 +75,6 @@ void content_login(struct session* ssn, mastodont_t* api, char** data)
printf("Set-Cookie: access_token=%s; Path=/; Max-Age=31536000\r\n", token.access_token);
printf("Set-Cookie: logged_in=t; Path=/; Max-Age=31536000\r\n");
// if config_url_prefix is empty, make it root
printf("Location: %s\r\n\r\nRedirecting...",
config_url_prefix[0] == '\0' ?
"/" : config_url_prefix);
redirect(REDIRECT_303, config_url_prefix ?
(config_url_prefix[0] == '\0' ?
"/" : config_url_prefix) : "/");