Set permissive CORS
This commit is contained in:
parent
c5663f7e55
commit
00eadfaf95
@ -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'] = [];
|
||||
|
@ -16,6 +16,7 @@
|
||||
"author": "Garrett Mills <garrett@glmdev.tech> (https://glmdev.tech/)",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"cors": "^2.8.5",
|
||||
"flitter-auth": "^0.4.0",
|
||||
"flitter-cli": "^0.10.0",
|
||||
"flitter-flap": "^0.4.0",
|
||||
|
12
yarn.lock
12
yarn.lock
@ -585,6 +585,14 @@ core-util-is@~1.0.0:
|
||||
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
|
||||
integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=
|
||||
|
||||
cors@^2.8.5:
|
||||
version "2.8.5"
|
||||
resolved "https://registry.yarnpkg.com/cors/-/cors-2.8.5.tgz#eac11da51592dd86b9f06f6e7ac293b3df875d29"
|
||||
integrity sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==
|
||||
dependencies:
|
||||
object-assign "^4"
|
||||
vary "^1"
|
||||
|
||||
debug@2.6.9, debug@^2.1.0, debug@^2.1.1:
|
||||
version "2.6.9"
|
||||
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
|
||||
@ -1640,7 +1648,7 @@ number-is-nan@^1.0.0:
|
||||
resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d"
|
||||
integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=
|
||||
|
||||
object-assign@^4.0.1, object-assign@^4.1.0:
|
||||
object-assign@^4, object-assign@^4.0.1, object-assign@^4.1.0:
|
||||
version "4.1.1"
|
||||
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
|
||||
integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=
|
||||
@ -2468,7 +2476,7 @@ validator@^10.11.0:
|
||||
resolved "https://registry.yarnpkg.com/validator/-/validator-10.11.0.tgz#003108ea6e9a9874d31ccc9e5006856ccd76b228"
|
||||
integrity sha512-X/p3UZerAIsbBfN/IwahhYaBbY68EN/UQBWHtsbXGT5bfrH/p4NQzUCG1kF/rtKaNpnJ7jAu6NGTdSNtyNIXMw==
|
||||
|
||||
vary@~1.1.2:
|
||||
vary@^1, vary@~1.1.2:
|
||||
version "1.1.2"
|
||||
resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc"
|
||||
integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=
|
||||
|
Loading…
Reference in New Issue
Block a user