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

fix #1331 added proxy call instead of original #1343

Closed

Conversation

saidaipparla
Copy link
Contributor

No description provided.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.09%) to 80.261% when pulling 044ae91 on saidaipparla:print_preview into b639dee on geosolutions-it:master.

@@ -7,7 +7,7 @@
*/
const {connect} = require('react-redux');
const {compose} = require('redux');

var ConfigUtils = require('../../utils/ConfigUtils');
Copy link
Contributor

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),
Copy link
Contributor

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.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.3%) to 79.898% when pulling 2ef705a on saidaipparla:print_preview into b639dee on geosolutions-it:master.

@mbarto
Copy link
Contributor

mbarto commented Dec 13, 2016

Replaced by #1347

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 this pull request may close these issues.

4 participants