From 98d7d6cb702af2708f20e7cf16ee10a9f71b578a Mon Sep 17 00:00:00 2001 From: Matthew Kosarek Date: Sat, 13 Mar 2021 15:43:56 -0500 Subject: My First WASM application is rendering a triangle on the frontend --- backend/server.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'backend') diff --git a/backend/server.cpp b/backend/server.cpp index ac8f9fb..b9d6f1c 100644 --- a/backend/server.cpp +++ b/backend/server.cpp @@ -302,7 +302,7 @@ bool trySendFile(SOCKET clientSocket, char* filename) { sprintf(filePath, "../../frontend%s", filename); bool isBinary = false; - if (endsWith(filename, ".ico")) { + if (endsWith(filename, ".ico") || endsWith(filename, ".wasm")) { isBinary = true; } @@ -322,6 +322,8 @@ bool trySendFile(SOCKET clientSocket, char* filename) { contentType = "text/css"; } else if (endsWith(filename, ".ico")) { contentType = "image/x-icon"; + } else if (endsWith(filename, ".wasm")) { + contentType = "application/wasm"; } else { contentType = "text/plain"; } -- cgit v1.2.1