Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update utils.py to double quotes the secrets and update proxy headers #30

Merged
merged 2 commits into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion sarthi.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ server {
location / {
proxy_pass http://sarthi:5000;
proxy_set_header Host $host;
proxy_read_timeout 600s;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
Expand All @@ -48,4 +49,4 @@ server {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
}
2 changes: 1 addition & 1 deletion server/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@
secret_data = response.json()
with open(os.path.join(project_path, ".env"), "w") as file:
for key, value in secret_data["data"]["data"].items():
file.write(f"{key}={value}\n")
file.write(f'{key}="{value}"\n')

Check warning on line 336 in server/utils.py

View check run for this annotation

Codecov / codecov/patch

server/utils.py#L336

Added line #L336 was not covered by tests


def get_random_stub(project_name: str) -> str:
Expand Down
Loading