Skip to content

Commit

Permalink
Update utils.py to double quotes the secrets and update proxy headers (
Browse files Browse the repository at this point in the history
…#30)

* Update utils.py

* Update sarthi.conf.template
  • Loading branch information
tushar5526 authored Jan 30, 2024
1 parent 2087abc commit 301f690
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
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 @@ def inject_env_variables(self, project_path):
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')


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

0 comments on commit 301f690

Please sign in to comment.