-
Notifications
You must be signed in to change notification settings - Fork 175
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
Custom paths not effective #671
Comments
tihs issue maybe the same problem with issue655. when I tested backends paths, i found paths is nil (dlv) p c.Backends |
I thought we had fixed 655, but apparently not--I'll get on that later today. Seems like a plausible cause for the underlying issue @morningstart-liu is experiencing; I'll take a look at that afterwards and see if things are fixed. |
but Custom lost. Custom in paths/options/options.go:SetDefaults() |
The configuration for paths works generally like this:
Previously, step 3 (the bit in paths/options) was happening, but step 5 (in backends/options) wasn't. My testing shows custom paths coming through on the config HTTP request with this fix--if you're still seeing your issue, please let me know in more detail what's happening. |
We are testing a specific url (http://www.test.com/XXXX) will perform diffrent action according to the path configuration. eg: for http://www.test.com/server-status/xxx that pefix with /server-status will add Header CDN: test1 |
I see. Thank you for the clarification--I'll work on finding the cause for that today. |
I found the null pathConfig assignment, p3 always null even it's merged with p. |
Will do. I didn't find the time to run through causes today but this is a good lead for tomorrow, thank you.! |
it's lost"request_params" at this point ? if not , why ? |
@morningstart-liu Good question, not sure--I'm adding this to the PR for review. @togear After some investigation I think there's a wider problem with rewriters outside of this issue; would it be alright if I made a new issue for investigating it? As far as I can tell the open PR solves the original problem of this issue, which is that custom path configuration was not being applied and returned through the API, but is now. I'm not seeing rewriters being applied to paths, and I'm additionally not seeing the Custom field of paths reliably making it to the function you referenced. Merge relies on that field to know what needs copying, so when the Custom field is left empty, Merge does nothing. Need to discuss with other maintainers before moving forward on fixing that problem, as it's possible I'm missing some context here. |
@jakenichols2719 it will be all right to make other issues for Clarify the usage of Paths |
Hi,
I tested paths functionality by referring to the profile of paths.md. But didn't get the result that I wanted, and then I got the runtime configuration (http://127.0.0.1:8484/trickster/config) and I didn't see the configuration that I had customized, so, can you see where the problem is, thanks you .
version: Trickster version: 2.0.0-beta2 (linux/amd64)
my config.yaml
runtime configuration just about paths :
The text was updated successfully, but these errors were encountered: