summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2022-09-20 18:06:42 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2022-09-20 18:06:42 +0800
commitbacdaf69179cb38ee459a13616c31d3c0c3a130e (patch)
tree171bd165bd484003c97822154da93a3465c19a7e
parent5f0dd2ec4458a571925e32135fd3728fd22d0872 (diff)
Revert "Expects the index to not need app URL any more"
This reverts commit abda7366211a0edfe989325fb091850f9f89fc20.
-rw-r--r--shopify.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/shopify.c b/shopify.c
index c076015..fd76ad5 100644
--- a/shopify.c
+++ b/shopify.c
@@ -368,10 +368,10 @@ static enum MHD_Result handle_request(void *cls, struct MHD_Connection *con,
char html[sb.st_size + 1];
read(fd, html, sb.st_size);
close(fd);
- const size_t index_len = sb.st_size - strlen("%s") * 2
- + api_key_len + host_len;
+ const size_t index_len = sb.st_size - strlen("%s") * 4
+ + api_key_len + host_len + app_url_len * 2;
char index[index_len + 1];
- sprintf(index, html, api_key, host);
+ sprintf(index, html, api_key, host, app_url, app_url);
res = MHD_create_response_from_buffer(index_len, index,
MHD_RESPMEM_MUST_COPY);
MHD_add_response_header(res, "Content-Security-Policy",