Skip to content

Commit aa74c25

Browse files
committed
Fix for oauth connection from OpenProject to nextcloud
Signed-off-by: Sagar <sagargurung1001@gmail.com>
1 parent ea027f7 commit aa74c25

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

lib/main.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,6 @@ async def proxy_Requests(_request: Request, path: str):
6969
"default-src * 'unsafe-inline' 'unsafe-eval' data: blob:;"
7070
)
7171

72-
# http://localhost:3000/stable30/index.php/apps/app_api/proxy/openproject-nextcloud-app/projects/dev-custom-fields/work_packages
73-
7472
return Response(
7573
content=response.content,
7674
status_code=response.status_code,
@@ -136,6 +134,9 @@ async def proxy_request_to_server(request: Request, path: str):
136134
response.status_code = 200
137135
elif "oauth/authorize" in url:
138136
response.headers["location"] = response.headers["location"]
137+
elif "apps/oauth2/authorize" in response.headers["location"]:
138+
response.status_code = 200
139+
response.headers["location"] = response.headers["location"]
139140
else:
140141
headers["content-length"] = "0"
141142
response = await handle_redirects(

0 commit comments

Comments
 (0)