I've inherited an Ember.js project that uses ember-prerender for SEO. I have the following ember-prerender config:
var prerender = require('ember-prerender/lib');
var config = {
"port": parseInt(process.env.PORT) || 4000,
"processNum": 0,
"engine": "phantom",
"contentReadyDelay": 0,
"initializeTimeout": 25000,
"renderTimeout": 15000,
"maxRequestsPerRenderer": 100,
"maxQueueSize": 1000,
"appUrl": "http://localhost:3000/",
"initializeUrl": "",
"applicationPage": "index.html",
"serveFiles": true,
"filesMatch": "/\\.(?:css|js|jpg|png|gif|ico|svg|woff|ttf|swf|map)(?:\\?|$)/i",
"logging": {
"level": "debug",
"timestamp": true,
"format": true
},
"plugins": [
"removeScriptTags",
"httpHeaders"
]
};
var server = prerender(config);
server.start();
The app is able to start up successfully. However, when I browse to http://localhost:4000/
, it gives the following error in the browser console:
GET http://localhost:4000/ net::ERR_CONTENT_LENGTH_MISMATCH
Here's the header info from the initial request:
Request URL:http://localhost:4000/
Request Method:GET
Status Code:200 OK
Remote Address:127.0.0.1:4000
# Response Headers
Connection:keep-alive
Content-Length:800111
Content-Type:text/html;charset=UTF-8
Date:Tue, 19 Jan 2016 14:26:49 GMT
# Request Headers
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Encoding:gzip, deflate, sdch
Accept-Language:en-US,en;q=0.8,es;q=0.6
Cache-Control:no-cache
Connection:keep-alive
Host:localhost:4000
Pragma:no-cache
Upgrade-Insecure-Requests:1
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36
Any ideas of what's happening?
Aucun commentaire:
Enregistrer un commentaire