@azteam/express 1.2.391 → 1.2.393

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/lib/Server.js CHANGED
@@ -138,6 +138,7 @@ var Server = /*#__PURE__*/function () {
138
138
  if (origin && whiteList && !whiteList.some(function (re) {
139
139
  return origin.endsWith(re);
140
140
  })) {
141
+ console.error("CORS ".concat(agent, " ").concat(origin));
141
142
  error = new _error.ErrorException(_error.CORS, "".concat(origin, " Not allowed by CORS"));
142
143
  }
143
144
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azteam/express",
3
- "version": "1.2.391",
3
+ "version": "1.2.393",
4
4
  "license": "MIT",
5
5
  "author": "toda <sp.azsolution.net@gmail.com>",
6
6
  "main": "./lib/index.js",
package/src/Server.js CHANGED
@@ -112,6 +112,7 @@ class Server {
112
112
  let error = null;
113
113
  if (!authorization && !agent.startsWith(systemUser)) {
114
114
  if (origin && whiteList && !whiteList.some((re) => origin.endsWith(re))) {
115
+ console.error(`CORS ${agent} ${origin}`);
115
116
  error = new ErrorException(CORS, `${origin} Not allowed by CORS`);
116
117
  }
117
118
  }
@@ -8,7 +8,12 @@
8
8
  <url>
9
9
  <loc><%= 'https://' + domain + item.path; %></loc>
10
10
  <priority><%= priority; %></priority>
11
- <lastmod><%= new Date(item.modified_at * 1000).toISOString().split('T')[0]; %></lastmod>
11
+
12
+ <% if (item.modified_at) { %>
13
+ <lastmod><%= new Date(item.modified_at * 1000).toISOString().split('T')[0]; %></lastmod>
14
+ <%} else{%>
15
+ <lastmod><%= new Date().toISOString().split('T')[0]; %></lastmod>
16
+ <%}%>
12
17
  <changefreq>daily</changefreq>
13
18
  </url>
14
19
  <%}%>