-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Send version header #1564
Send version header #1564
Changes from all commits
3c69e1e
a728237
9baca15
0abcdf4
df5e8ed
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,7 +63,7 @@ module.exports.app = (options = {}) => { | |
app.use((req, res, next) => { | ||
res.header( | ||
'Access-Control-Allow-Headers', | ||
[res.get('Access-Control-Allow-Headers'), 'uppy-auth-token'].join(', ') | ||
[res.get('Access-Control-Allow-Headers'), 'uppy-auth-token', 'uppy-client'].join(', ') | ||
) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. uppy-versions? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Node.js will lowercase it for us, but i think so far we've tried to use uppercasing like that in tus/uppy headers |
||
next() | ||
}) | ||
|
@@ -218,6 +218,7 @@ const getOptionsMiddleware = (options) => { | |
options, | ||
s3Client, | ||
authToken: req.header('uppy-auth-token') || req.query.uppyAuthToken, | ||
clientVersion: req.header('uppy-versions') || req.query.uppyVersions, | ||
buildURL: getURLBuilder(options) | ||
} | ||
next() | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works but we should add a todo to the changelog to use https://www.npmjs.com/package/semver for these checks, especially if we're going to have more breaking changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adding on asana so you can ignore the above
e; nvm you already did it, both is fine :P