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
Dashboard resources aren't accessible from gateway #30
Comments
Will fix this, allow me some time. You can raise a PR as you know where to make this changes. I believe dashboard links are not working and static media can't be downloaded. |
We need to make other changes as well, it's not only base.html, js files needs to be changed as well. |
sure, take your time :) if the problem is related to js + css files only, i recommend loading them from any trusted CDN. ...Just testing something right now, (again, if the problem is related to js + css files only), i was able to reach resource files from the gateway with this direct link (example):
looking again for the
I have peeked the if this worked, i believe that it could be a quick fix of the problem. Please try it before any other changes ;) ... Thinking about impacts, the only dependency is between the path prefix and the public resources folder named |
Thanks for the information,
I'm hesitate to ask, why do you think deleting /rqueue would work?
Don't we have to map API urls? Also, please let me know how did you setup this entire flow, I can try, I was checking Eureka but that does not good fit, which api gateway being used here? |
There's a difference between them, relative and absolute paths. Quoting from Here:
Also from Mozilla Docs :: Linking to relative URLs:
When looking to the links, i have noticed that you map to In case of gateway, the microservice is not running as
the browser will handle the rest by appending to the relative path, and the controller will return them successfully
We don't have to, in theory, the browser will do that.
I have tried Eureka and consul, they didn't worked really well in production, so i changed to a zuul-proxy gateway. you could generate one quickly using jHipster: https://start.jhipster.tech/generate-application then, add in
|
Just tried, it's not working for home page. Maybe we should just remove / not /rqueue. |
Do you think, is it possible for you to setup url prefix in the rqueue app via spring configuration file?
This works fine, if I make changes in the code. |
Have you looked into network? To see the url that the browser used? And yes, try removing the / only to see if it works. For rqueue.web.url.prefix, we will let it as alternative. in theory, this could be done by just having the right url pattern and setup. |
No, it's not working. It's not working on home page since when we are on http://localhost:8080/rqueue, we refer static files on this page than it's using http://localhost:8080/vendor/js/.... and that's correct as per relative path theory. Now if you are on another page http://localhost:8080/rqueue/pending, static files now will refer to http://localhost:8080/rqueue/vendor/js/.... As you can see the absolute URL might change as we move from one page to another page, this is creating problem. Another way could be to make dashboard SPA using Angular etc. |
* Allow consuming dead letter queue messages.
Hi Chlegou Thanks. |
Ok thanks for the clarification, I will test it out and let you know. ...And yes, thinking of SPA would be a better approach. Also, adding an authentication to it would be a good idea I think... |
Authentication is not added here, since people might have different types of authentication in the place and they can just place this /rqueue/** in the same group, you can use oauth as well, that could be very simple using Spring security. Though I'm working on new Rqueue Broker that will have authentication since that would be running as a standalone application. #28 |
personally, I would prefer rqueue to be a standalone SPA. |
I started testing the version
when running the app with :
From the MS: the rqueue isn't accessible.
Is there a way to make it work from both MS and Gateway? |
Thanks for pointing this out, this bug was introduced while fixing #29 :(
IMO by just using |
Sorry, for my last release that's not working. Rqueue should be accessible from MS and Gateway as well. Once you confirm, it's working fine than I'll make a release. |
Yes it's working on local! :D even without setting the |
Thanks for the confirmation, I've released 2.0.4-RELEASE, you can upgrade your code to this version.
|
* * Allow prefixing the urls #30 * Allow consuming dead letter queue messages. * Fixes for #29 * removed ignored * updated copyright * updated versions. * * Fixes for String can not be cast to QueueConfig * Fixes for messageMetaData being null in TaskAggregator * Use x-forwarded-prefix to allow the Rqueue to be accessible via Api Gateway and direct access. * comment out version. * Updated code to reflect 2.0.4
Hi again :)
I have noticed that the rqueue dashboard isn't accessible from a gateway of a microservice architecture server.
How to Reproduce
i have checked the source code of the dashboard template, and it looks like the href links (css + js files) are static to direct endpoint. See here.
for this, the resource files aren't accessible. please change the href links to accept any entry path.
Additional Details
Here is an example of HTTP calling the dashboard from a direct microservice and from the gateway.
Please make resources accessible from any dynamic endpoint.
Thanks. :)
The text was updated successfully, but these errors were encountered: