Open prothegee opened 1 month ago
@prothegee Thanks so much for your patch. I noticed that there is currently a reverse proxy example in the example directory. Is your example different from it? Can you consider submitting your modifications based on the original example?
drogon framework is more like http framework arsenal in my mind, dev user can leverage their existence knowledge to do what their want from drogon framework.
back when example of 'simple_reverse_proxy' exists, I had something in mind to use drogon framework as my core server rather than use nginx or h2o.
back then, I can't figure it out how extend this framework as webserver since it was early year I used drogon framework, so either I ended up using drogon as one backend in one machine using port 80 & 443 or I mix it up with another webserver.
and yet now I could figure it out how to extend as core server rather than use another webserver/server proxy.
my appoligies to not provide more information as the core purpose of my pr.
the keyword of 'simple example' and 'example' is already different.
to consider as modification from original example, offcourse I believe it's possible.. but the keyword 'simple_reverse_proxy' thou...
perhaps I could provide as 'reverse_proxy', 'webserver_reverse_proxy', or extend 'simple_reverse_proxy' then decide does this related pr is suitable to be merge or not, requesting permission from you/maintainer.
question: what does error mean on:
never use this kind of workflow, and how to fix those error by the way?
@prothegee Thank you for your patient explanation, I will accept this PR after some code review
I have a concern about creating large examples.
As drogon release new version, old examples may have compatiblility issues. It's hard to say that example authors will keep maintaining them. At last the maintaining work falls on us. I personally don't feel like to maintain something I don't use at all...
I suggest we create a standalone repo for large examples. At least it won't affect the main project.
Sure, something like core and extras is a good idea.
I had related closed issue with this, [HttpAppFramework / HttpClientPtr ] can't change/set (ssl key, cert, & configuration) after/on plugin
since currently drogon can't change/set included key, cert, & conf on the run, this example proly useless, unless using wildcard cert key
I think I'm gonna kept it on my branch fork repo or just let it dangle in that closed issue for historical search
I have swiftly sifted through it and I like the idea of the ReverseProxy plugin.
If we consider merging this, then I'll try to do a full review.
Based on the above discussion, I think creating a new drogon-examples repo is a solution acceptable to everyone. I will do it ASAP.
The Play framework has a repo for each example. That's one approach.
On Thu, May 30, 2024, 8:00 PM An Tao @.***> wrote:
Based on the above discussion, I think creating a new drogon-examples repo is a solution acceptable to everyone. I will do it ASAP.
— Reply to this email directly, view it on GitHub https://github.com/drogonframework/drogon/pull/2035#issuecomment-2141149836, or unsubscribe https://github.com/notifications/unsubscribe-auth/BBZFRV52MWSNTYXAS5R4GR3ZE7RVVAVCNFSM6AAAAABIHG4D4GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBRGE2DSOBTGY . You are receiving this because you are subscribed to this thread.Message ID: @.***>
The Play framework has a repo for each example. That's one approach.
I vote for this
I think one repo per example is too much, and will only increase burden on the maintainers, but if this organization would be bigger, I would also prefer this approach.
drogon framework example: webserver reverse proxy
NOTE:
steps:
add these:
to
linux debian base location:
/etc/hosts
:windows base location:
C:\Windows\System32\drivers\etc\hosts
:make it sure drogon config is already installed on your machine environment
build this project, you can use build-debug-linux.sh on linux environment
launch:
terminal:
./drogon_server
./backend_api
./backend_www
open your browser:
go to:
http://www.localhost.com:9999
:http://localhost.com:9999
http://localhost.com:9999
:http://api.localhost.com:9999
:http://api.localhost.com:9999/test
:/test
endpoint/path and show which port is calledpreview result example
end of readme