content icon indicating copy to clipboard operation
content copied to clipboard

Unable to modify websocket url

Open snakysnake opened this issue 2 years ago • 2 comments

Environment



Reproduction

Try to change websocket url to your desired value, for example 127.0.0.1 or your local network device ip

Describe the bug

I am trying to change the url of the websocket. I was able to locate where the url is being created: /node_modules/@nuxt/content/dist/runtime/composables/web-socket.mjs (line 57 ... ctrl+f 'const wsURL =' ....)

const wsURL =  `${useRuntimeConfig().public.content.wsUrl}ws`;

I tried a few times to change the value of the accessed env variable but was unable to. My approaches were both to modify the .env and to write to nuxt.config.js at the "specified location" (public.content.wsUrl) but somehow my changes are ignored. Either I am missing for example some sort of overwrite that happens or I am somehow misunderstanding something else here, but even though I tried I was unable to find a way to set my wanted variable value here.

Please help me out and let me know how to change it, or whether the change not being recognized is a bug.

Dear regards, Snakysnake

Additional context

I changed it manually just by overwriting the value inside the file, but for obvious reasons, this is not a longterm solution.

Logs

No response

snakysnake avatar Dec 14 '23 14:12 snakysnake

You can modify watch url via watch option in module config. Also take a look at listhen options

farnabaz avatar Jan 25 '24 15:01 farnabaz

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.

github-actions[bot] avatar Aug 20 '24 01:08 github-actions[bot]