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

Properly handle static assets for announcements #891

Merged
1 commit merged into from May 15, 2022
Merged

Properly handle static assets for announcements #891

1 commit merged into from May 15, 2022

Conversation

ghost
Copy link

@ghost ghost commented May 14, 2022

Description

This PR allows dispatcher to handle static assets (such as images) for announcements. To use dispatcher for this, you can use {{DISPATCH_PUBLIC}} as a domain name in GameAnnouncement.json and GameAnnouncementList.json.

In addition, this PR:

  • Properly determine MIME of served file
  • Properly handle 404 when file does not exist or is a directory
  • Ensure bytes are converted to String as UTF-8, otherwise Java fallback is system locale
  • Removes routes handlers for /sw.js and /dora/lib/vue/2.6.11/vue.min.js. The first is not necessary nor ever called with cleared UnityWebView cache and second is something specific that we do not need (in case you wish to use certain files instead of writing HTML yourself, just replace that URL with /hk4e/announcement/vue.min.js).

Both tag_icon.png and banner images not provided for obvious reasons.

Issues fixed by this PR

N/A

Type of changes

  • Bug fix
  • New feature
  • Enhancement
  • Documentation

Checklist:

  • My code follows the style guidelines of this project
  • My pull request is unique and no other pull requests have been opened for these changes
  • I have read the Contributing note and Code of conduct
  • I am responsible for any copyright issues with my code if it occurs in the future.

@ghost ghost merged commit 0231f26 into Grasscutters:development May 15, 2022
Birdulon pushed a commit to Birdulon/Grasscutter that referenced this pull request Aug 21, 2022
This pull request was closed.
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 this pull request may close these issues.

None yet

0 participants