Skip to content

Commit 290aa21

Browse files
committed
review address
Signed-off-by: Sagar <[email protected]>
1 parent 00f3d76 commit 290aa21

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ Assuming you’re in the apps folder of Nextcloud with command git:
1717
npm ci && npm run dev
1818
```
1919
- Enable the `app_api`
20-
2120
```bash
2221
# Assuming you’re in nextcloud server root directory
2322
sudo -u www-data php occ a:e app_api
@@ -56,8 +55,8 @@ Assuming you’re in the apps folder of Nextcloud with command git:
5655
```
5756
- Configure script before running external app
5857
```bash
59-
cd openproject-nextcloud-app
60-
cp ex_app_run_script.sh.example ex_app_run_script.sh
58+
cd openproject-nextcloud-app
59+
cp ex_app_run_script.sh.example ex_app_run_script.sh
6160
```
6261
Once you have copied the script to run the external application, configure the following environments
6362

lib/main.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ async def proxy_request_to_server(request: Request, path: str):
113113
headers=headers,
114114
)
115115
else:
116-
# for getting oauth token the content-type 'application/x-www-form-urlencoded' sems to be required
116+
# for getting oauth token the content-type 'application/x-www-form-urlencoded' seems to be required
117117
if request.method == 'POST' and "/oauth/token" in url:
118118
headers.update({'content-type': 'application/x-www-form-urlencoded'})
119119
response = await client.request(
@@ -132,10 +132,10 @@ async def proxy_request_to_server(request: Request, path: str):
132132
response.headers["location"] = redirect_url
133133
response.status_code = 200
134134
elif "oauth/authorize" in url:
135-
response.headers["location"] = response.headers["location"]
135+
return response
136136
elif "apps/oauth2/authorize" in response.headers["location"]:
137-
response.headers["location"] = response.headers["location"]
138137
response.status_code = 200
138+
return response
139139
else:
140140
headers["content-length"] = "0"
141141
response = await handle_redirects(

0 commit comments

Comments
 (0)