Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Purpose and use of 'jsonp callback' setting in module /config/lib/express.js #1448

Closed
miller-productions opened this issue Aug 26, 2016 · 2 comments

Comments

@miller-productions
Copy link

miller-productions commented Aug 26, 2016

Hi everyone,

This is a similar question to #1447

A query regarding a setting in module config/lib/express.js...

Inside the function initMiddleware there is the following call:

app.enable('jsonp callback');

What is the intent behind this? By the looks of it, it is related to whether or not the app enables jsonp callback support, however I am puzzled as to how/where this is used. Is it deprecated? Or, perhaps, is the express API doc missing this? I ask this question for the following reasons:

  1. this setting doesn't appear to be used/read anywhere else in the app. i.e. a search here in the github repository for the setting jsonp callback returns only a single result, i.e. where it is set. I understand from this that it is probably not intended to be 'used' by the app but rather by the express module internally;
  2. according to the express API doc, app.enable(name) sets the Boolean setting name to true, where name is one of the properties from the app settings table. However, I note that jsonp callback isn't listed in said app settings table.

Thanks for your time reading and considering this question.

Sincerely,
Dan

@lirantal lirantal added this to the 0.5.0 milestone Aug 27, 2016
@lirantal lirantal self-assigned this Aug 27, 2016
@lirantal
Copy link
Member

@danoz-direct thanks for bringing this up.
I don't think it's required anymore but the option does exist, if you look at the settings table you pointed (http://expressjs.com/en/4x/api.html#app.settings.table) then it's there with a default 'callback' handler if the name is not specified.

@mleanos
Copy link
Member

mleanos commented Sep 30, 2016

Resolved with #1463

@mleanos mleanos closed this as completed Sep 30, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants