-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
File request failure #145
Comments
@cqkisyouq can you post your configuration.json file? |
"ReRoutes": [ |
@TomPallister |
@cqkisyouq which version of Ocelot are you using? It should not append the / to the url for the downstream service. Unless I have introduced a bug :( |
@TomPallister version 2.0 Generate matching rules here: Create(FileReRoute reRoute) upstreamTemplate = upstreamTemplate.SetLastCharacterAs('/'); |
@TomPallister I want to access the file How to do? |
@cqkisyouq I'm not sure what you mean by access the file. Could you explain more? I will write a failing test and see if we can understand the problem. |
@TomPallister After the ocelot processing into such a url http://localhost/1.txt/ Returns the status of 404 |
@cqkisyouq please ignore previous comment. |
I have also noticed this part of your config. That should cause Ocelot to not work. I think you might have an older version of Ocelot. "DownstreamPathTemplate": "api/{url}", It needs to start with a forward slash. Please use Install-Package Ocelot -Version 2.0.1 to get the latest! |
Ive got a branch here with some changes that I think fix your issue but I havent been able to get a failing test yet. https://github.com/TomPallister/Ocelot/tree/feautre/fix-%23145 |
OK I have a test for the issue! Pushed with my latest commit to that branch |
@TomPallister static files: Thank you for your attention! |
@cqkisyouq please try Install-Package Ocelot -Version 2.0.2 Hopefully will work now. |
At in DownstreamRouteFinderMiddleware
upstreamUrlPath = upstreamUrlPath.SetLastCharacterAs('/');
At the end of the url added '/',Make the url to access error.
The text was updated successfully, but these errors were encountered: