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

URL parameters are not passed to prerender.io #27

Open
merijndk opened this issue Jun 28, 2019 · 2 comments
Open

URL parameters are not passed to prerender.io #27

merijndk opened this issue Jun 28, 2019 · 2 comments

Comments

@merijndk
Copy link

Currently custom URLs are not passed to prerender.io.

www.yoursite.nl?param=0 will send a request without the param=0 to the prerender.io server:

return $this->client->get($this->prerenderUri . '/' . urlencode($protocol.'://'.$host.'/'.$path), compact('headers'));

Should become:

return $this->client->get($this->prerenderUri . '/' . urlencode($protocol.'://'.$host.'/'.$path.$paramsString), compact('headers'));

merijndk added a commit to merijndk/Laravel-Prerender that referenced this issue Jun 28, 2019
@thoop
Copy link
Contributor

thoop commented Aug 22, 2019

@skunheal could you make a PR for this change? I see in your repo you are looping through the $request->query() to turn the param array into a string. Is there an easier way to get the query parameters as a string on the URL already? Seems like there should be something standard already there for that.

merijndk added a commit to merijndk/Laravel-Prerender that referenced this issue Aug 23, 2019
@merijndk
Copy link
Author

Replaced the for loop with $request->getQueryString(). The only thing is that all URLs are now being sent with an "?" at the end even when there are no query parameters. Shouldn't be a problem tho.

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