2 Answers
- Newest
- Most votes
- Most comments
2
Hello.
How about configuring your EC2 web server so that when access to "blabla" occurs, it redirects to "blabla/"?
In the case of Apache, I think you can use "DirectorySlash" to redirect by adding a slash at the end.
https://httpd.apache.org/docs/2.4/en/mod/mod_dir.html
0
Yes, I was thinking about that but I have different endpoints for "blabla/" and "blabla".
Thanks for replying!
answered 5 days ago
Relevant content
- Accepted Answerasked 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a day ago
- AWS OFFICIALUpdated 3 months ago
I see, then why not try putting Lambda between API Gateway and EC2 to convert the URL and send the request? I thought it would be possible to handle this by converting the URL with Lambda and then requesting EC2.
You mean putting Lambda between API Gateway and EC2 just when the request url is "{domain}/blabla/{proxy+}"?
Is API Gateway proxying "{domain}/blabla/" or it will proxify to lamda "{domain}/blabla" as it does with EC2?
Yes, it is.
I don't think the slash will be added even if the API Gateway backend is Lambda. So, I thought that the solution would be to add a slash to the URL when a request comes to Lambda and send the request to EC2.