Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Costume LiveReloadScriptUrl not using local js file #62

Open
gsipic opened this issue Jun 19, 2024 · 0 comments
Open

Costume LiveReloadScriptUrl not using local js file #62

gsipic opened this issue Jun 19, 2024 · 0 comments

Comments

@gsipic
Copy link

gsipic commented Jun 19, 2024

Hi, there is problem when we use costume url link for config LiveReloadScriptUrl.

Problem is with this code :

if (string.IsNullOrEmpty(_ClientScriptString))
            {
                // Load `/LiveReloadClientScript.js from resource stream
                lock (_ClientScriptString)
                {
                    if (string.IsNullOrEmpty(_ClientScriptString))
                    {
                        using (var scriptStream = Assembly.GetExecutingAssembly()
                            .GetManifestResourceStream("Westwind.AspNetCore.LiveReload.LiveReloadClientScript.js"))
                        {
                            if (scriptStream == null)
                                throw new InvalidDataException("Unable to load LiveReloadClientScript.js Resource");

                            var buffer = new byte[scriptStream.Length];
                            scriptStream.Read(buffer, 0, buffer.Length);
                            _ClientScriptString = System.Text.Encoding.UTF8.GetString(buffer);
                        }
                    }
                }
            }

Its always using internal Westwind.AspNetCore.LiveReload.LiveReloadClientScript.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant