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

403 Forbidden error occured when loading the fonts folder of the webapp made with Vue.js #61

Closed
dukeduck1984 opened this issue Jul 30, 2019 · 4 comments

Comments

@dukeduck1984
Copy link

dukeduck1984 commented Jul 30, 2019

Hi,

I'm using the MicroWebSrv to serve both the back end (rest api) and the front end (made with vue.js). The back end worked fine, but there is some issues with the front end.

The web app packed by Vue.js has 4 folders along with index.html, they are: css, fonts, js, statics. Altough extremely slow when loading the page for the first time, most parts of the page have loaded correctly except for the icons which are fonts. So I took a look at the console, and found some errors, e.g. GET http://192.168.123.108/fonts/flUhRq6tzZclQEJ-Vdg-IuiaDsNcIhQ8tQ.0509ab09.woff2 net::ERR_ABORTED 403 (Forbidden)

How can I solve this problem? Is there a way to mark this folder as static folder like in Flask?

Thanks,
Kaiyuan

@dukeduck1984
Copy link
Author

Does it have something to do with the internally supported Mimetypes? Is it possible to manually add other mimetypes? For example, those font files are ended with .woff or .woff2

@jczic
Copy link
Owner

jczic commented Jul 30, 2019

I've solved the problem :)
You can pull the git (last commit 425e665)

@dukeduck1984
Copy link
Author

Thank you so much!!

I was just about to say that I added 2 lines in _mimeTypes and now it's working. Wonderful! :-))

@jczic
Copy link
Owner

jczic commented Oct 20, 2019 via email

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

2 participants