Amazon web services Elastic Beanstalk网站未加载到Firefox上
我正在该域上运行此主机:。该网站加载的是谷歌Chrome,而不是Firefox(没有错误消息)。Elastic Beanstalk URL确实加载:。有人能帮我理解这个吗?这是我的Amazon web services Elastic Beanstalk网站未加载到Firefox上,amazon-web-services,firefox,amazon-elastic-beanstalk,amazon-route53,Amazon Web Services,Firefox,Amazon Elastic Beanstalk,Amazon Route53,我正在该域上运行此主机:。该网站加载的是谷歌Chrome,而不是Firefox(没有错误消息)。Elastic Beanstalk URL确实加载:。有人能帮我理解这个吗?这是我的浏览器列表: > 0.5% last 2 versions Firefox ESR not dead not IE 9-11 # For IE 9-11 support, remove 'not'. AWS EC2自动运行带有 我的Firefox是最新的:版本80.0.1(64位)。Firefox对JavaSc
浏览器列表
:
> 0.5%
last 2 versions
Firefox ESR
not dead
not IE 9-11 # For IE 9-11 support, remove 'not'.
AWS EC2自动运行带有
我的Firefox是最新的:版本80.0.1(64位)。Firefox对JavaScript的使用更严格吗?是否需要在server.js
中更改某些内容
Beanstalk设置:
根据评论
该问题是由于缺少www.xinthes.com
的别名记录造成的
解决方案是添加它,这样
www.xinthes.com
就可以指向路由53中的EB域。现在似乎起作用了,但只是http://xinthose.com
,而不是http://www.xinthose.com
@Marcin是的,你是对的;我每次都要用一个私人窗口来测试它;奇怪的在URL处理方面,Chrome和Firefox肯定有些不同;这个应用程序是有角度的,所以它应该在两个方面都能工作。您是否也为www设置了域?例如,在route53中,从www@Marcin-yup创建一个到apex域的别名记录,就是这样!非常感谢。如果你把这个作为答案,我会接受的。我只有一张Xinthes.com的A记录,没有www.xinthes.com。显然Chrome可以处理重定向,但不能处理Firefox。是的,我实际上让www.xinstalk.com
指向Beanstalk URL:xinthose2 env.eba-4qavumcw.us-east-2.elasticbeanstalk.com
"use strict";
const express = require("express");
const compression = require('compression');
// config
const port = process.env.PORT || 3000;
const app_folder = "./";
const options = {
dotfiles: 'ignore',
etag: false,
extensions: ['html', 'js', 'scss', 'css'],
index: false,
maxAge: '1y',
redirect: true,
}
// create app
const app = express();
app.use(compression());
app.use(express.static(app_folder, options));
// serve angular paths
app.all('*', function (req, res) {
res.status(200).sendFile(`/`, {root: app_folder});
});
// start listening
app.listen(port, function () {
console.log("Node Express server for " + app.name + " listening on http://localhost:" + port);
});