Spaces:
Runtime error
Runtime error
Download apps/webapp/app/utils/requestUrl.server.ts from BTankut/Context-Store-LLM: direct link, hf CLI and curl.
- Browser
- Download file 291 Bytes
-
https://huggingface.co/spaces/BTankut/Context-Store-LLM/resolve/main/apps/webapp/app/utils/requestUrl.server.ts
- Command line
-
hf download hf://spaces/BTankut/Context-Store-LLM/apps/webapp/app/utils/requestUrl.server.ts
-
curl -L -o requestUrl.server.ts https://huggingface.co/spaces/BTankut/Context-Store-LLM/resolve/main/apps/webapp/app/utils/requestUrl.server.ts
291 Bytes
| // Updates the protocol of the request url to match the request.headers x-forwarded-proto | |
| export function requestUrl(request: Request): URL { | |
| const url = new URL(request.url); | |
| if (request.headers.get("x-forwarded-proto") === "https") { | |
| url.protocol = "https:"; | |
| } | |
| return url; | |
| } | |