-
Notifications
You must be signed in to change notification settings - Fork 19
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
Problem (and solution) for sites in subdirectory #23
Comments
Hey, that look sensible to me. It could even be done in the |
sure, will do! |
Thanks for looking at it.
I guess the most critical problem is #26 |
Hi guys,
|
Good point, but:
|
updated the PR |
Thanks |
PHP7+ is fine, just wanted to note you could use |
This looks way better. Updated the PR |
Indeed it is better :) |
Hi,
Great plugin!
I found an issue when using it in a website that is not in the root folder of the web server. All the links to the endpoints in the documentation would point to
/api-docs/...
. So if I was visiting the docs inlocalhost/my-site/api-docs
, for example, all links would point tolocalhost/api-docs
.It took me a while even to notice that, because as all the interaction happens in the React app, the links actually worked. The contents were correctly loaded, even though the address in the address bar would change to an unexisting one.
But after I fixed it, I realized that all the content from the default pages were not being loaded.
So after tweaking a bit, I came up with the solution below.
In
Restsplain.php
, line 73, where you read:I changed to:
I really don't know the implications of that, Ive being playing with the plugin for an hour or so, but it seems to work fine.
If you had the time to have a look and see if it looks good it would be great to see this fix incorporated. I'd be happy to send a pull request or feel free to implement it directly.
cheers
The text was updated successfully, but these errors were encountered: