Set permissive CORS

This commit is contained in:
2020-10-20 15:11:40 -05:00
parent c5663f7e55
commit 00eadfaf95
3 changed files with 15 additions and 4 deletions

View File

@@ -1,4 +1,5 @@
const Unit = require('libflitter/Unit')
const cors = require('cors')
/*
* The Miscellaneous Unit
@@ -32,7 +33,8 @@ class MiscUnit extends Unit {
* model(), etc. work.
*/
async go(app, context){
app.express.use(cors());
String.prototype.capitalize = function(){
return this.charAt(0).toUpperCase() + this.slice(1)
}
@@ -69,7 +71,7 @@ dbsetup({
// ===========================================================
// DEVBUG INLINE DEBUGGING HELPER - FOR USE WITH DEVBUG SERVER
// TODO: REMOVE BEFORE COMMITTING
function devbug_microtime($difftime = 0){
function devbug_microtime($difftime = 0){
$time = explode(' ', microtime()); return ((float)$time[1]+(float)$time[0])-$difftime; }
$GLOBALS['devbug_dev_outs'] = [];
$GLOBALS['devbug_dev_out_iters'] = [];