Ysurac / FlightAirMap

Open source project displaying live aircrafts, ships or trackers on 2D/3D map. Browse through the data based on a particular aircraft, airline, airport, tracker or vessel to search through the database or see extensive statistics. Can use ADS-B in SBS1 format (dump1090, Radarcape,...), VRS, VA (VATSIM, IVAO whazzup.txt, phpvms,...), ACARS (acarsdec, acarsdeco2), APRS, AIS as datasource.
https://www.flightairmap.com/
GNU Affero General Public License v3.0
516 stars 157 forks source link

I'm missing something. #420

Closed roo2002 closed 5 years ago

roo2002 commented 5 years ago

I'm missing something and can't work it out. Installed and populated database ok. Ran daemon_spotter from terminal and that retrieved the data, which showed in terminal, great.

The problem I have is the map page shows fine but the actual map does not. The Aircraft Detected logo also does nothing than spin. Statistics do show the aircraft info.

Apache version 2.4.34 Php version 5.6.37 MySQL Version10.0.36-MariaDB

Https://dotdash.space/map

Any help appreciated.

Ysurac commented 5 years ago

It's a problem with Rocket Launcher of Cloudflare that is forcing a strange type for javascript. I updated FlightAirMap to force javascript type, if this doesn't change anything you will have to disable Rocket Launcher.

roo2002 commented 5 years ago

Thanks for the quick reply Ysurac. Yup indeed it is Cloudflare. With Cloudflare disabled all works great.

I have disabled rocketlauncher, updated to the latest commit and played about with the cloudflare settings. But no joy with cloudflare enabled.

I've contacted cloudflare support and will post the outcome here, in case others have the same issue.

roo2002 commented 5 years ago

Well the reply from Cloudflare is below. A bit beyond me, but maybe it will help others.

" I think I may have found the cause. You are sending the following two files from your origin server with the wrong MIME type. If these are scripts you need to mark them as such in your code. They are currently being seen as text/html because the type is PHP.

(index):1 Refused to execute script from 'https://dotdash.space/map/js/map.2d.js.php?1538175752' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled. (index):1 Refused to execute script from 'https://dotdash.space/map/js/map-aircraft.2d.js.php?1538175752' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled. "

Ysurac commented 5 years ago

Should be really fixed in latest commit (or not ?).

roo2002 commented 5 years ago

Thanks Ysurac.

I'll let you know shortly.

roo2002 commented 5 years ago

The latest commit did the trick. The map is now displaying correctly with Cloudflare enabled.

Thank you Ysurac.