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

transformRequest does not work with SSR #696

Closed
willopez opened this issue Dec 14, 2018 · 2 comments
Closed

transformRequest does not work with SSR #696

willopez opened this issue Dec 14, 2018 · 2 comments
Assignees

Comments

@willopez
Copy link
Contributor

willopez commented Dec 14, 2018

Issue: Bug

Platform:
Web

Description:
I am using ReactiveSearch web, with Next.JS. Attempting to implement SSR with transformRequest provided in settings like so:

const settings = {
  app: ...,
  transformRequest: (request) => { console.log("transformRequest"); return request; },
  url: ...
};

The provided transform function does not get executed on the server. Looking at this line: https://github.com/appbaseio/reactivesearch/blob/dev/packages/web/src/server/index.js#L271

It's obvious that the transform function provided in settings is ignored.

Can SSR support for transformRequest be added?

@willopez
Copy link
Contributor Author

@metagrover Please checkout my proposed implementation

@metagrover
Copy link
Contributor

Thank you for the contribution. We will roll this out in the upcoming release 🎉

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

No branches or pull requests

2 participants