diff --git a/README.md b/README.md index 9bcb2bb..a97f310 100644 --- a/README.md +++ b/README.md @@ -59,11 +59,9 @@ Thanks to [Insum Solutions](http://insum.ca/) for sponsoring this project. - [Oracle APEX](https://apex.oracle.com) 4-5 (or more) for [Application Setup Option 2](/docs/apex-setup.md) - [Git](https://git-scm.com/downloads) -*Having `Cross Origin Sharing Requests` issues? [See CORS documentation](/docs/cors.md).* - ## Install - Open the command line -- Go to your desired APEX Front-End Boost directory +- Go to your desired installation directory - Execute ```bash git clone https://github.com/OraOpenSource/apex-frontend-boost.git @@ -72,7 +70,6 @@ npm install ``` *Having problems installing on Windows? [See documentation](/docs/windows.md).* - *Having problems installing on Linux? [See documentation](/docs/linux.md).* ## Update diff --git a/changelog.md b/changelog.md index a9870e9..c598ec8 100644 --- a/changelog.md +++ b/changelog.md @@ -1,6 +1,9 @@ # Changelog ## 2.1.3 -- Added a config option `config.browsersync.ghostMode` to enable/disable the mirroring of clicks, scrolls and typing across devices. +- **APEX Front-End Boost is now usable on ORDS 3.0.3 and up.** +- Adds an option `config.browsersync.ghostMode` to enable/disable the mirroring of clicks, scrolls and typing across devices. +- Reloads the browser for any changes made inside `img` and `lib` folders. +- Notifies you when APEX Front-End Boost has a new version ## 2.1.2 - Removed `npm` as an install option for simplicity. diff --git a/docs/apex-setup.md b/docs/apex-setup.md index 9596137..4845cbe 100644 --- a/docs/apex-setup.md +++ b/docs/apex-setup.md @@ -3,10 +3,10 @@ APEX Front-End Boost requires some slight modifications to your APEX application. These changes are required in order to have your APEX application communicate with APEX Front-End Boost. There are two options to setup your application: -- **Option 1) Standard** +- **[Option 1) Standard](#option-1-standard)** - 1 Build Option - 1 Application Process -- **Option 2) Custom Application Item** +- **[Option 2) Custom Application Item](#option-2-custom-application-item)** - 1 Build Option - 1 Application Item - 2 Application Processes diff --git a/docs/cors.md b/docs/cors.md deleted file mode 100644 index 38693e5..0000000 --- a/docs/cors.md +++ /dev/null @@ -1,20 +0,0 @@ -## Cross Origin Sharing Requests - -Starting from ORDS `3.0.3`, a new security rule concerning `Cross Origin Sharing Requests` conflicts with APEX Front-End Boost when using a VM through port forwarding: - -> 403 Forbidden -> The request cannot be processed because this resource does not support Cross Origin Sharing requests, or the request Origin is not authorized to access this resource. If ords is being reverse proxied ensure the front end server is propagating the host name, for mod_proxy ensure ProxyPreserveHost is set to On - -This occurs when the server is using ORDS `3.0.3`, `3.0.4` or `3.0.5`. - -For Apache, there are 2 options - 1- set the ProxyPreserveHost parameter to On. - 2- RequestHeader set Origin http://:/ - For example : RequestHeader set Origin http://apexworld.com:80/ - - This forces the origin http header to a value. - -Otherwise until then please use ORDS `3.0.2` or less, as the error does **NOT** occur. - -Here are some related forum topics: -- https://community.oracle.com/thread/3906326 -- https://community.oracle.com/message/13659147 diff --git a/gulpfile.js b/gulpfile.js index 6c6c620..627abb0 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -21,10 +21,9 @@ try { validate = require('jsonschema').validate, schema = require('./lib/defaultSchema'), fs = require("fs"), - mkdirp = require('mkdirp'); - - const chalk = require('chalk'); - const updateNotifier = require('update-notifier'); + mkdirp = require('mkdirp'), + chalk = require('chalk'), + updateNotifier = require('update-notifier'); } catch (e) { console.error('Your installation is missing dependencies. Please execute "npm install" again.'); process.exit(); @@ -83,14 +82,14 @@ if (config.header.enabled) { var pkg = require(config.header.packageJsonPath); var banner = ['/*!', ' * <%= pkg.name %> - <%= pkg.description %>', - ' * @author v<%= pkg.author %>', + ' * @author <%= pkg.author %>', ' * @version v<%= pkg.version %>', ' * @link <%= pkg.homepage %>', ' * @license <%= pkg.license %>', ' */', ''].join('\n'); } catch (e) { - console.log(chalk.red.bold("Your 'config.header.packageJsonPath' is invalid. It should point to your package.json file.")); + console.log(chalk.red.bold("Your 'config.header.packageJsonPath' is invalid. It should point to your project package.json file.")); process.exit(); } } @@ -141,6 +140,9 @@ var paths = { apexMiddleware = function (req, res, next) { res.setHeader('Set-Cookie', ['oos-apex-frontend-boost-app-images=//' + req.headers.host + '/']); next(); + }, + apexProxyReq = function(req, res, next) { + req.setHeader('Origin', req.agent.protocol + '//' + req._headers.host); }; // build directory structure @@ -286,7 +288,8 @@ gulp.task('browsersync', function() { notify: config.browsersync.notify, proxy: { target: config.appURL, - middleware: apexMiddleware + middleware: apexMiddleware, + proxyReq: [apexProxyReq] }, serveStatic: [config.distFolder], ui: { diff --git a/lib/scssToLess.js b/lib/scssToLess.js index 42ab8ea..5091416 100644 --- a/lib/scssToLess.js +++ b/lib/scssToLess.js @@ -16,7 +16,9 @@ module.exports = function() { .replace(/ !default/g, '') .replace(/',/g, ',') .replace(/'\./g, '.') - .replace(/#{([^}]+)}/g, "~\"$1\"") + .replace(/\'/g, '"') + // .replace(/#{([^}]+)}/g, "~\"$1\"") + .replace(/#{([^}]+)}/g, "$1") .replace(/~\"@(\w+)\"/g, "@{$1}") .replace(/adjust-hue\(/g, 'spin(') .replace(/^.*@import.*$/mg, "") diff --git a/package.json b/package.json index d2142ad..44ec33c 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "postinstall": "node generateConfig.js" }, "dependencies": { - "browser-sync": "2.14.x", + "browser-sync": "2.17.x", "chalk": "1.1.x", "del": "2.2.x", "gulp": "3.9.x", @@ -41,12 +41,12 @@ "gulp-imagemin": "3.0.x", "gulp-jshint": "2.0.x", "gulp-less": "3.1.x", - "gulp-load-plugins": "1.2.x", + "gulp-load-plugins": "1.3.x", "gulp-plumber": "1.1.x", "gulp-rename": "1.2.x", "gulp-sass": "2.3.x", "gulp-size": "2.1.x", - "gulp-sourcemaps": "2.0.0-alpha", + "gulp-sourcemaps": "2.1.1", "gulp-uglify": "2.0.x", "gulp-util": "3.0.x", "jshint": "2.x", @@ -59,6 +59,6 @@ "run-sequence": "1.2.x", "through2": "2.0.x", "update-notifier": "1.0.x", - "yargs": "5.0.x" + "yargs": "6.0.x" } }