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

Static files linked from HTML not working #68

Open
olaven opened this issue Apr 24, 2020 · 1 comment · May be fixed by #69
Open

Static files linked from HTML not working #68

olaven opened this issue Apr 24, 2020 · 1 comment · May be fixed by #69

Comments

@olaven
Copy link
Contributor

olaven commented Apr 24, 2020

I am serving HTML statically, and the HTML includes a script-tag, e.g.:
<script src="./client.js" type="module"></script>

./client.js is a file in the public directory, so my understanding is that this should work.
However, Dinatra handles this as a standard response, not a static response. Because of this,
appropriate content-type header is not set, and the browser does not load the file.

@olaven olaven linked a pull request Apr 24, 2020 that will close this issue
@olaven
Copy link
Contributor Author

olaven commented Apr 24, 2020

I have implemented a working (but not good enough) fix in the linked PR.
I am very much looking for input, as I'm not sure how to approach this.

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

Successfully merging a pull request may close this issue.

1 participant