aotrautils-srv 0.0.304 → 0.0.305

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.
@@ -1,6 +1,6 @@
1
1
 
2
2
 
3
- /*utils COMMONS library associated with aotra version : «1_29072022-2359 (03/12/2022-15:05:26)»*/
3
+ /*utils COMMONS library associated with aotra version : «1_29072022-2359 (03/12/2022-16:04:15)»*/
4
4
  /*-----------------------------------------------------------------------------*/
5
5
 
6
6
 
@@ -4827,7 +4827,7 @@ AOTRAUTILS_LIB_IS_LOADED=true;
4827
4827
 
4828
4828
 
4829
4829
 
4830
- /*utils SERVER library associated with aotra version : «1_29072022-2359 (03/12/2022-15:05:26)»*/
4830
+ /*utils SERVER library associated with aotra version : «1_29072022-2359 (03/12/2022-16:04:15)»*/
4831
4831
  /*-----------------------------------------------------------------------------*/
4832
4832
 
4833
4833
 
@@ -5829,6 +5829,8 @@ launchNodeHTTPServer=function(port, doOnConnect=null, doOnFinalizeServer=null, /
5829
5829
 
5830
5830
  const EXCLUDED_FILENAMES_PARTS=[".keyHash."];
5831
5831
 
5832
+ const ADD_CORS_HEADER=true;
5833
+
5832
5834
 
5833
5835
  if(typeof(https)==="undefined"){
5834
5836
  // TRACE
@@ -5863,6 +5865,10 @@ launchNodeHTTPServer=function(port, doOnConnect=null, doOnFinalizeServer=null, /
5863
5865
  return;
5864
5866
  }
5865
5867
 
5868
+
5869
+ // To remove the CORS error message (cf. https://medium.com/@dtkatz/3-ways-to-fix-the-cors-error-and-how-access-control-allow-origin-works-d97d55946d9)
5870
+ if(ADD_CORS_HEADER) response.header('Access-Control-Allow-Origin', '*');
5871
+
5866
5872
 
5867
5873
  const urlFile="." + url;
5868
5874
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aotrautils-srv",
3
- "version": "0.0.304",
3
+ "version": "0.0.305",
4
4
  "main": "aotrautils-srv.build.js",
5
5
  "description": "A library for vanilla javascript utils (server-side) used in aotra javascript CMS",
6
6
  "author": "Jeremie Ratomposon <info@alqemia.com> (https://alqemia.com)",