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

when no custom css/js is defined, wrong mimetype causes Chrome to complain #2514

Closed
5 tasks done
nitram509 opened this issue Oct 1, 2023 · 0 comments · Fixed by #2515
Closed
5 tasks done

when no custom css/js is defined, wrong mimetype causes Chrome to complain #2514

nitram509 opened this issue Oct 1, 2023 · 0 comments · Fixed by #2515
Labels
bug Something isn't working

Comments

@nitram509
Copy link
Contributor

Component

server, web-ui

Describe the bug

Just open Chrome developer tools window and navigate to https://ci.woodpecker-ci.org.

error message
Refused to apply style from 'https://ci.woodpecker-ci.org/assets/custom.css' because its MIME type ('text/plain') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

Screenshot 2023-10-01 at 17 04 07

System Info

* Chrome latest version (as of 2023-10-01)
* Woodpecker next-7d2bf54685

Additional context

No response

Validations

  • Read the Contributing Guidelines.
  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Checked that the bug isn't fixed in the next version already [https://woodpecker-ci.org/faq#which-version-of-woodpecker-should-i-use]
  • Check that this is a concrete bug. For Q&A join our Discord Chat Server or the Matrix room.
@nitram509 nitram509 added the bug Something isn't working label Oct 1, 2023
nitram509 added a commit to nitram509/woodpecker that referenced this issue Oct 1, 2023
nitram509 added a commit to nitram509/woodpecker that referenced this issue Oct 2, 2023
nitram509 added a commit to nitram509/woodpecker that referenced this issue Oct 2, 2023
nitram509 added a commit to nitram509/woodpecker that referenced this issue Oct 3, 2023
@6543 6543 closed this as completed in #2515 Oct 3, 2023
6543 pushed a commit that referenced this issue Oct 3, 2023
closes #2514 

The fix is simple, just providing a file name, so
`http.ServeContent(...)` can set the correct mimeype in case the content
is zero bytes.

The test was just extended.

PS: I would appreciate a `hacktoberfest-accepted` label ;)

---------

Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant