1
votes

I am hosting this open source website running on this domain: www.xinthose.com. The website loads on Google Chrome, but not Firefox (no error message). The Elastic Beanstalk URL does load though: http://xinthose2-env.eba-4qavumcw.us-east-2.elasticbeanstalk.com/home. Can anyone help me to understand this please? Here is my browserslist:

> 0.5%
last 2 versions
Firefox ESR
not dead
not IE 9-11 # For IE 9-11 support, remove 'not'.

AWS EC2 automatically runs the website with node server.js

"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);
});

My Firefox is up to date: version 80.0.1 (64 bit). Is Firefox more strict on JavaScript use? Do I need to change something in server.js?

Beanstalk setup:

enter image description here

1
Seems to work now, but only http://xinthose.com, not http://www.xinthose.comMarcin
@Marcin yes, you're right; I have to use a private window each time to test it; weird; there must be something different between Chrome and Firefox with URL handling; the application is angular, so it should work on bothxinthose
Do you have your domain set for www as well? For example, in route53 make A Alias record to apex domain from www.Marcin
@Marcin yup, that was it! Thank you. If you post that as the answer, I will accept it. I only had an A record for xinthose.com, not www.xinthose.com. Apparently Chrome can handle the redirect but not Firefox.xinthose

1 Answers

1
votes

Based on the comments.

The issue was caused by missing A Alias record for www.xinthose.com.

The solution was to add it, so that www.xinthose.com so that it points to EB domain in Route53.