mktcms 0.1.20 → 0.1.21

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/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mktcms",
3
3
  "configKey": "mktcms",
4
- "version": "0.1.20",
4
+ "version": "0.1.21",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -50,10 +50,14 @@ export default defineEventHandler(async (event) => {
50
50
  const fullPath = s3Prefix + ":" + path;
51
51
  const isImage = path.match(/\.(png|jpg|jpeg|gif|svg|webp)$/i);
52
52
  const isPdf = path.endsWith(".pdf");
53
+ const isJson = path.endsWith(".json");
54
+ const isCSV = path.endsWith(".csv");
53
55
  if (isImage) {
54
56
  event.node.res.setHeader("Content-Type", "image/" + path.split(".").pop()?.toLowerCase());
55
57
  } else if (isPdf) {
56
58
  event.node.res.setHeader("Content-Type", "application/pdf");
59
+ } else if (isJson || isCSV) {
60
+ event.node.res.setHeader("Content-Type", "application/json; charset=utf-8");
57
61
  } else {
58
62
  event.node.res.setHeader("Content-Type", "text/plain; charset=utf-8");
59
63
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mktcms",
3
- "version": "0.1.20",
3
+ "version": "0.1.21",
4
4
  "description": "Simple CMS module for Nuxt",
5
5
  "repository": "mktcode/mktcms",
6
6
  "license": "MIT",