Skip to content

Commit

Permalink
[xy] Fix dbt block delete request with nginx. (mage-ai#5332)
Browse files Browse the repository at this point in the history
# Description
<!-- Please include a summary of the change and which issue is fixed.
Please also include relevant motivation and context.
List any dependencies that are required for this change.
-->
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?
<!-- Please describe the tests that you ran to verify your changes.
Provide instructions so we can reproduce.
-->

- [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:
<!-- Optionally mention someone to let them know about this pull request
-->
  • Loading branch information
wangxiaoyou1993 authored Aug 9, 2024
1 parent 1c07229 commit bc12689
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mage_ai/server/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,10 @@ def make_app(
# Download resource
(r'/api/downloads/(?P<token>[\w/%.-]+)', ApiResourceDownloadHandler),
(r'/api/(?P<resource>file_contents)/(?P<pk>.+)', ApiResourceDetailHandler),
(
r'/api/(?P<resource>pipelines)/(?P<pk>[\w\-\%2f\.]+)'
r'/(?P<child>blocks)/(?P<child_pk>.+)',
ApiChildDetailHandler),
(
r'/api/(?P<resource>\w+)/(?P<pk>[\w\-\%2f\.]+)'
r'/(?P<child>\w+)/(?P<child_pk>[\w\-\%2f\.]+)',
Expand Down

0 comments on commit bc12689

Please sign in to comment.