summaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorMatthew Kosarek <matthew.kosarek@vention.cc>2021-03-13 15:43:56 -0500
committerMatthew Kosarek <matthew.kosarek@vention.cc>2021-03-13 15:43:56 -0500
commit98d7d6cb702af2708f20e7cf16ee10a9f71b578a (patch)
tree92cec56a5a31a9658c44d49ed896ba8b7859450f /backend
parent3b0514ed3a21c39b7ea1a68d2fb381c808dcfeeb (diff)
My First WASM application is rendering a triangle on the frontend
Diffstat (limited to 'backend')
-rw-r--r--backend/server.cpp4
1 files changed, 3 insertions, 1 deletions
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";
}