Closed lominming closed 10 months ago
I tried to reproduce the problem, deployed it to vercel but It seems to work fine.
Where are you deploying it or how are you testing the https server?
@JesusP2 On further investigation, it is a very curious situation. I was wondering whether I am missing some proxy setup in Vite?
1) The actual prod env that I am facing this issue is Solid Start Vite project in Docker image, deployed to AWS ECS. (https gone within entry-server)
GET https://mywebsite.com/
IN ENTRY SERVER http://mywebsite.com/
2) With a fresh install of solid-start, together with @vitejs/plugin-basic-ssl
to get https on localhost, I get the following (becomes undefined?).
GET https://localhost:3000/
IN ENTRY SERVER http://undefined/
3) If I use ngrok to proxy, when I hit http://1234-11-22-33-44.ngrok-free.app, I get (https gone):
GET https://localhost:3000/
IN ENTRY SERVER http://1234-11-22-33-44.ngrok-free.app/
4) Check out this codesandbox: https://codesandbox.io/p/sandbox/solid-start-experimental-forked-rt5ntz (should be https too):
GET http://localhost:3000/
IN ENTRY SERVER http://rt5ntz-3000.csb.app/
I think there's some obvious proxy related setting somewhere? This feels like a Vite config related issue, but not apparently clear which one is the correct config. It could be server.proxy
but unclear.
// Code for SSL on localhost
import solid from "solid-start/vite";
import { defineConfig } from "vite";
import basicSsl from '@vitejs/plugin-basic-ssl'
export default defineConfig({
plugins: [solid(), basicSsl()],
});
In setting up for SolidStarts next Beta Phase built on Nitro and Vinxi we are closing all PRs/Issues that will not be merged due to the system changing. If you feel your issue was closed by mistake. Feel free to re-open it after updating/testing against 0.4.x release. Thank you for your patience.

See https://github.com/solidjs/solid-start/pull/1139 for more details.
Duplicates
Latest version
Current behavior 😯
Using a fresh solid-start installation,
entry-server
itself gets the wrong protocol of the url. No matter whether I am accessing from https, the url will always be http.Give this code, and I visit
https://example.com/test
<--- note that it is HTTPSThe output for console log is
http://example.com/test
<--- note that this becomes HTTPI am unclear whether this is (A) expected behavior, but I am not understanding the way it works (B) a bug (C) a configuration I missed on vite
Expected behavior 🤔
Expect the console log to include HTTPS i.e.
https://example.com/test
Steps to reproduce 🕹
Steps:
Context 🔦
Why this matters:
useSecureCookie
to true. But on production it kept failing because the trace of the code leads back to entry-server already feeding the URL with the wrong protocol.Your environment 🌎