Skip to content

Commit e0d1b7f

Browse files
committed
fix dynamic route
1 parent 5bd1002 commit e0d1b7f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

app.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,17 @@ async def dynamic_github_route(request: Request, path: str):
111111
})
112112

113113

114+
@app.post("/{path:path}", response_class=HTMLResponse)
115+
async def dynamic_github_route_post(
116+
request: Request,
117+
path: str,
118+
repo_url: str = Form(...),
119+
additional_instructions_hidden: str = Form("")
120+
):
121+
"""Handle POST requests for GitHub-style URLs, reusing the generate_dockerfile logic."""
122+
return await generate_dockerfile(request, repo_url, additional_instructions_hidden)
123+
124+
114125
@app.post("/", response_class=HTMLResponse)
115126
async def generate_dockerfile(
116127
request: Request,

0 commit comments

Comments
 (0)