Merge pull request #123 from EETagent/ssr_http_fix

(frontend) force http
This commit is contained in:
Vojtěch Jungmann 2023-01-05 15:52:47 +01:00 committed by GitHub
commit 9627aae050
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,6 +14,8 @@ export const handleFetch: HandleFetch = async ({ request, fetch, event }) => {
const url = new URL(request.url);
url.protocol = "http:";
url.host = process.env.PORTFOLIO_API_HOST ?? '127.0.0.1:8000';
url.pathname = url.pathname.replace(/^\/api/, '');