@boomerang-io/webapp-spa-server 1.3.2 → 1.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +9 -0
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -109,6 +109,15 @@ function createBoomerangServer({
|
|
|
109
109
|
appRouter.use("/", express.static(path.join(process.cwd(), BUILD_DIR)));
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
+
// Make sure that files with .css has a type="text/css" since they were throwing errors related to MIME check
|
|
113
|
+
app.use(express.static(APP_ROOT, {
|
|
114
|
+
setHeaders: function (res, path) {
|
|
115
|
+
if (path.endsWith(".css")) {
|
|
116
|
+
res.set("Content-Type", "text/css");
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}));
|
|
120
|
+
|
|
112
121
|
app.use(APP_ROOT, appRouter);
|
|
113
122
|
|
|
114
123
|
// Start server on the specified port and binding host
|