Replies: 1 comment 1 reply
-
|
You don't have to prefix the build command with origin. It's the node build/index.js command. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I've been using
@sveltejs/adapter-nodeon DigitalOcean Apps and managed to get it up and running as long as I setcheckOriginto false, which I understand is not ideal. I've seen a few posts about setting theORIGINenvironment variable but it doesn't seem to work.On DigitalOcean Apps, my component settings are as follows:
npm run buildnpm run previewThe Apps interface allows you to set environment variables, but the posts I've seen online mention prefixing
npm run buildwithORIGIN=http://localhost:3000(such asORIGIN=http://localhost:3000 npm run build). I'm not sure if these two methods are identical. Meanwhile, the adapter-node docs mentionORIGIN=https://my.site node build. To add to the confusion, the port is 4173 in my setup, but both the docs and the posts I've seen speak of port 3000 (if I'm not mistaken, this is the default port used by Node, while Vite'spreviewuses 4173).I've tried every combination based on the previous information:
ORIGINenvironment variable (in the Apps interface) ashttp://localhost:3000,http://localhost:4173andhttps://my.siteORIGIN=http://localhost:3000,ORIGIN=http://localhost:4173andORIGIN=https://my.siteNone of these work. I'm starting to wonder if DigitalOcean's deployment process is overriding something, or if my configuration is faulty in some other way. There's also a set of "CORS Policy" settings in the Apps interface, but I don't think they are relevant (I've left them as "Not Configured"). In my browser network tab, the origin header is always
https://my.siteno matter what setup I use. It also may be worth noting that I'm currently testing using theondigitalocean.appdomain provided by DigitalOcean. Any help?Beta Was this translation helpful? Give feedback.
All reactions