11ty / eleventy

A simpler site generator. Transforms a directory of templates (of varying types) into HTML.
https://www.11ty.dev/
MIT License
17.12k stars 493 forks source link

Live reload or domdiff doesn't work with local custom tld #2956

Open bediu opened 1 year ago

bediu commented 1 year ago

Operating system

Linux

Eleventy

2.0.1

Describe the bug

I use an internally built in reverse proxy to create custom tlds for developments, such as website.local over (locally) authorized https for good measure.

This is my server options:

eleventyConfig.setServerOptions({
        port: 20464,
        liveReload: true,
        domDiff: true,

        host: 'website.local',
        https: {
          key: path.join(__dirname, '/.cert/localghost', 'https.key'),
          cert: path.join(__dirname, '/.cert/localghost', 'https.cert'),
        },
    });

Everything is working fine except the reloading features.

I am assuming this has to do with the websocket server, since my reverse proxy doesn't support the websocket protocol.

With other setups such as Vite, I simply set the websocket server through a config directly over localhost, so my reverse proxy doesn't try to handle it.

Can I do something similar with eleventy?

Reproduction steps

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See an error

Expected behavior

No response

Reproduction URL

No response

Screenshots

No response

scragz commented 1 week ago

https://github.com/11ty/eleventy-dev-server/issues/9