mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-26 21:32:42 +00:00
Hide debug box on debug:false
prevents potential security bugs
This commit is contained in:
parent
24fe134641
commit
5d0681088d
@ -5,8 +5,8 @@
|
||||
<div class="row">
|
||||
<div class="column">
|
||||
<h1>{{ error.statusCode }} </h1>
|
||||
<h4> {{ $route.path }} </h4>
|
||||
<pre class="error-box"><code>{{ error.message }}<%if(isDev){%><br>{{ error.stack }}<%}%></code></pre>
|
||||
<h4> {{ error.message }} </h4>
|
||||
<%if(debug){%><pre class="error-box"><code>URI: {{ $route.path }}<br>{{ error.stack }}</code></pre><%}%>
|
||||
<p v-if="error.statusCode === 404 || error.statusCode === 'Whoops!'">
|
||||
<nuxt-link class="error-link" to="/">Back to the home page</nuxt-link>
|
||||
</p>
|
||||
@ -50,6 +50,7 @@ export default {
|
||||
-webkit-text-size-adjust: 100%;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
text-align: center;
|
||||
}
|
||||
.__nuxt-error-page .container {
|
||||
display: flex;
|
||||
|
@ -25,6 +25,7 @@
|
||||
-webkit-text-size-adjust: 100%;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
text-align: center;
|
||||
}
|
||||
.__nuxt-error-page .container {
|
||||
display: flex;
|
||||
@ -59,7 +60,7 @@ pre {
|
||||
<div class="column">
|
||||
<h1>{{ status }} </h1>
|
||||
<h4> {{ name }} </h4>
|
||||
<pre class="error-box"><code>{{ message }}</code></pre>
|
||||
<%if(debug){%><pre class="error-box"><code>{{ message }}</code></pre><%}%>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -137,6 +137,7 @@ export default class Builder extends Tapable {
|
||||
options: this.options,
|
||||
uniqBy: _.uniqBy,
|
||||
isDev: this.options.dev,
|
||||
debug: this.options.render.debug,
|
||||
router: this.options.router,
|
||||
env: this.options.env,
|
||||
head: this.options.head,
|
||||
|
Loading…
Reference in New Issue
Block a user