Commit 21b7009e authored by Pedro Eduardo Trujillo's avatar Pedro Eduardo Trujillo
Browse files

Merge branch 'hotfix-allowBotAccess' into 'master'

Hotfix allow bot access

See merge request redmic-project/client/web!77
parents 4cbbaa58 9aa4cd19
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
{
  "name": "REDMIC",
  "version": "0.19.3",
  "version": "0.19.4",
  "author": "REDMIC",
  "homepage": "https://gitlab.com/redmic-project/client/web/blob/master/README.md",
  "description": "Integrated marine data repository of Canary Islands - Client",
+15 −1
Original line number Diff line number Diff line
@@ -22,9 +22,23 @@ define([
			version: 537.36
		}],

		_allowedBots: ['Googlebot', 'bingbot'],

		isSupported: function() {

			for (var i = 0; i < this._supportedBrowsersAndMinVersion.length; i++) {
			var userAgent = navigator && navigator.userAgent,
				i;

			if (userAgent) {
				for (i = 0; i < this._allowedBots.length; i++) {
					var allowedBotFragment = this._allowedBots[i];
					if (userAgent.indexOf(allowedBotFragment) !== -1) {
						return true;
					}
				}
			}

			for (i = 0; i < this._supportedBrowsersAndMinVersion.length; i++) {
				var item = this._supportedBrowsersAndMinVersion[i],
					name = item.name,
					version = item.version;