-
Notifications
You must be signed in to change notification settings - Fork 416
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
fix #1331 added proxy call instead of original #1343
Conversation
@@ -7,7 +7,7 @@ | |||
*/ | |||
const {connect} = require('react-redux'); | |||
const {compose} = require('redux'); | |||
|
|||
var ConfigUtils = require('../../utils/ConfigUtils'); |
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.
const ConfigUtils
@@ -128,7 +128,7 @@ const PrintSubmit = connect((state) => ({ | |||
}))(require('../../components/print/PrintSubmit')); | |||
|
|||
const PrintPreview = connect((state) => ({ | |||
url: state.print && state.print.pdfUrl, | |||
url: state.print && ConfigUtils.getProxyUrl(state.print.pdfUrl), |
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.
You should use the proxied url only if it's not from the sameOrigin. Look here: https://github.com/geosolutions-it/MapStore2/blob/master/web/client/libs/ajax.js#L155
In addition: ConfigUtils.getProxyUrl(...) can return an object (look at the code linked above), you should take care of this. The best option would be to extract the code in ajax.js that handles proxyUrl, sameOrigin, useCORS and put it in a utility method.
Replaced by #1347 |
No description provided.