Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Identify unwanted code #2

Closed
yemel opened this issue Feb 10, 2015 · 5 comments · Fixed by #12
Closed

Identify unwanted code #2

yemel opened this issue Feb 10, 2015 · 5 comments · Fixed by #12

Comments

@yemel
Copy link
Contributor

yemel commented Feb 10, 2015

E.g. Storage and mailbox plugins

@yemel
Copy link
Contributor Author

yemel commented Feb 11, 2015

Disable CopayCrossDomain on config/express.js

  if (config.enableEmailstore) {
    var allowCopayCrossDomain = function(req, res, next) {
      if ('OPTIONS' == req.method) {
        res.send(200);
        res.end();
        return;
      }
      next();
    }
    app.use(allowCopayCrossDomain);
  }

@yemel
Copy link
Contributor Author

yemel commented Feb 11, 2015

Disable static file serving on config/express.js:

if (config.publicPath) {
    var staticPath = path.normalize(config.rootPath + '/../' + config.publicPath);
    //IMPORTANT: for html5mode, this line must to be before app.router
    app.use(express.static(staticPath));
  }

@yemel
Copy link
Contributor Author

yemel commented Feb 11, 2015

Remove custom headers at config/headers.js

res.setHeader('Access-Control-Allow-Headers', 'X-Requested-With,Content-Type,Authorization');
res.setHeader('Access-Control-Expose-Headers', 'X-Email-Needs-Validation,X-Quota-Per-Item,X-Quota-Items-Limit,X-RateLimit-Limit,X-RateLimit-Remaining');

@yemel
Copy link
Contributor Author

yemel commented Feb 11, 2015

Remove currency on config/routes.js:

  // Currency
  var currency = require('../app/controllers/currency');
  app.get(apiPrefix + '/currency', currency.index);

Drop app/controllers/currency.js as well

@yemel
Copy link
Contributor Author

yemel commented Feb 11, 2015

Remove default route on config/routes.js:

  app.get('*', index.render);

Remove associated code on app/controllers/index.js:

exports.render = function(req, res) {

  if (config.publicPath) {
    return res.sendfile(config.publicPath + '/index.html');
  }
  else {
    var version = _getVersion();
    res.send('bitcore-node API v' + version);
  }
};

@maraoz maraoz self-assigned this Feb 18, 2015
@yemel yemel closed this as completed in #12 Feb 18, 2015
kleetus added a commit that referenced this issue Jul 31, 2015
Add LD_LIBRARY_PATH for local
braydonf pushed a commit that referenced this issue Jul 31, 2015
Mac builds point to {os_dir}/lib
pnagurny added a commit that referenced this issue Sep 9, 2015
Fixes for isMainChain binding tests.
loganbauer pushed a commit to superflashcoin/bitcore-node that referenced this issue Oct 21, 2016
* commit '30e1f259815e9c9bbaf45544c1845ed887fcb4ee':
  update package.json
karelbilek referenced this issue in trezor-graveyard/bitcore-node May 24, 2017
Update download script, use v0.13.2.1-litecore-rc2
micahriggan pushed a commit that referenced this issue Mar 28, 2018
micahriggan added a commit that referenced this issue Mar 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants