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
低版本手机报错application/octet-stream #499
Labels
Comments
@Gitmingshao @Interceptor
class LoggerInterceptor : HandlerInterceptor {
companion object {
private const val TAG = "WebLogger"
}
override fun onIntercept(
request: HttpRequest,
respons: HttpResponse,
handler: RequestHandler,
): Boolean {
val httpPath = request.path
val method = request.method
val valueMap = request.parameter
RLog.v(TAG, "Path:$httpPath, Method:${method.value()}, Param:${Gson().toJson(valueMap)}")
if (httpPath.endsWith(".css")) {
respons.setHeader("Content-Type", "text/css; charset=UTF-8")
} else if (httpPath.endsWith(".js")) {
respons.setHeader("Content-Type", "application/javascript; charset=UTF-8")
}
return false
}
} |
我的2.1.10加上了,还是提示错误 |
totally works. many thanks |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Failed to load module script: The server responded with a non-JavaScript MIME type of "application/octet-stream". Strict MIME type checking is enforced for module scripts per HTML spec
The text was updated successfully, but these errors were encountered: