From bc1268926bdd983f2dd603c8ae3a9a6e2d4d7568 Mon Sep 17 00:00:00 2001 From: wangxiaoyou1993 <80284865+wangxiaoyou1993@users.noreply.github.com> Date: Fri, 9 Aug 2024 01:28:50 -0700 Subject: [PATCH] [xy] Fix dbt block delete request with nginx. (#5332) # Description Fix dbt block delete request with nginx. When dbt block with the nested path and run Mage in nginx, the block can't be deleted because nginx automatically decode the URL. This PR fixes this issue. # How Has This Been Tested? - [x] Tested locally # Checklist - [x] The PR is tagged with proper labels (bug, enhancement, feature, documentation) - [x] I have performed a self-review of my own code - [ ] I have added unit tests that prove my fix is effective or that my feature works - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation cc: --- mage_ai/server/server.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mage_ai/server/server.py b/mage_ai/server/server.py index 7feb2e4aedb..2db6bbcbd9d 100644 --- a/mage_ai/server/server.py +++ b/mage_ai/server/server.py @@ -346,6 +346,10 @@ def make_app( # Download resource (r'/api/downloads/(?P[\w/%.-]+)', ApiResourceDownloadHandler), (r'/api/(?Pfile_contents)/(?P.+)', ApiResourceDetailHandler), + ( + r'/api/(?Ppipelines)/(?P[\w\-\%2f\.]+)' + r'/(?Pblocks)/(?P.+)', + ApiChildDetailHandler), ( r'/api/(?P\w+)/(?P[\w\-\%2f\.]+)' r'/(?P\w+)/(?P[\w\-\%2f\.]+)',