OL 2.13 debian 8 geoserver 2.8 - problem with proxy.cgi

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

OL 2.13 debian 8 geoserver 2.8 - problem with proxy.cgi

Giuseppe Naponiello
Hi all,
I can't undarstand the problem:
server with debian 8, tomcat 8, geoserver 2.8, OpenLayers 2.13.
Apache run over https protocol, all proxy modules are enabled.
WMSGetFeatureInfo:
"info = new OpenLayers.Control.WMSGetFeatureInfo({
    title: 'Informazioni sui livelli interrogati',
    layers: [siti, vincoli, progetti, interventi, ind_neg],
    queryVisible: true,
    infoFormat:'application/json',
    format: new OpenLayers.Format.JSON,
    vendorParams: {buffer: 10},
    eventListeners: {
        getfeatureinfo: function(event) {
         var data = event.text;
         console.log(data);
        }
    }
});
map.addControl(info);
info.activate();"

...but when I click on map I read this error in firebug:
"Uncaught SyntaxError: Unexpected token #"

If I go on localhost/cgi-bin/proxy.cgi, I do not have the expected result but:
"#!/usr/bin/env python

"""This is a blind proxy that we use to get around browser
restrictions that prevent the Javascript from loading pages not on the
same server as the Javascript.  This has several problems: it's less
efficient, it might break some sites, and it's a security risk because
people can use this proxy to browse the web and possibly do bad stuff
with it.  It only loads pages via http and https, but it can load any
content type. It supports GET and POST requests."""

import urllib2
import cgi
import sys, os

# Designed to prevent Open Proxy type stuff.

......."
I probably forgot to install some library?
How to fix this annoying problem?!
Thanx
-beppe-
--
Giuseppe Naponiello

Arc-Team srl
piazza Navarrino, 13 - 38023Cles (TN) 
C.F. e P. IVA IT-01941600221 
cell.
 +393476846599
mail: [hidden email]
pec: [hidden email]
www.arc-team.com
http://arc-team-open-research.blogspot.it/

_______________________________________________
Users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/openlayers-users
Reply | Threaded
Open this post in threaded view
|

Re: OL 2.13 debian 8 geoserver 2.8 - problem with proxy.cgi

Giuseppe Naponiello
...I forget an important information, in firebug network tab the query string parameters sounds correct, so if I point my browser on this string, I get the correct json array.

2015-10-07 10:00 GMT+02:00 Giuseppe Naponiello <[hidden email]>:
Hi all,
I can't undarstand the problem:
server with debian 8, tomcat 8, geoserver 2.8, OpenLayers 2.13.
Apache run over https protocol, all proxy modules are enabled.
WMSGetFeatureInfo:
"info = new OpenLayers.Control.WMSGetFeatureInfo({
    title: 'Informazioni sui livelli interrogati',
    layers: [siti, vincoli, progetti, interventi, ind_neg],
    queryVisible: true,
    infoFormat:'application/json',
    format: new OpenLayers.Format.JSON,
    vendorParams: {buffer: 10},
    eventListeners: {
        getfeatureinfo: function(event) {
         var data = event.text;
         console.log(data);
        }
    }
});
map.addControl(info);
info.activate();"

...but when I click on map I read this error in firebug:
"Uncaught SyntaxError: Unexpected token #"

If I go on localhost/cgi-bin/proxy.cgi, I do not have the expected result but:
"#!/usr/bin/env python

"""This is a blind proxy that we use to get around browser
restrictions that prevent the Javascript from loading pages not on the
same server as the Javascript.  This has several problems: it's less
efficient, it might break some sites, and it's a security risk because
people can use this proxy to browse the web and possibly do bad stuff
with it.  It only loads pages via http and https, but it can load any
content type. It supports GET and POST requests."""

import urllib2
import cgi
import sys, os

# Designed to prevent Open Proxy type stuff.

......."
I probably forgot to install some library?
How to fix this annoying problem?!
Thanx
-beppe-
--
Giuseppe Naponiello

Arc-Team srl
piazza Navarrino, 13 - 38023Cles (TN) 
C.F. e P. IVA IT-01941600221 
cell.
 +393476846599
mail: [hidden email]
pec: [hidden email]
www.arc-team.com
http://arc-team-open-research.blogspot.it/



--
Giuseppe Naponiello

Arc-Team srl
piazza Navarrino, 13 - 38023Cles (TN) 
C.F. e P. IVA IT-01941600221 
cell.
 +393476846599
mail: [hidden email]
pec: [hidden email]
www.arc-team.com
http://arc-team-open-research.blogspot.it/

_______________________________________________
Users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/openlayers-users
Reply | Threaded
Open this post in threaded view
|

Re: OL 2.13 debian 8 geoserver 2.8 - problem with proxy.cgi

Giuseppe Naponiello
Sorry sorry sorry, apache cgi module was not enabled
Issue resolved!

2015-10-07 10:28 GMT+02:00 Giuseppe Naponiello <[hidden email]>:
...I forget an important information, in firebug network tab the query string parameters sounds correct, so if I point my browser on this string, I get the correct json array.

2015-10-07 10:00 GMT+02:00 Giuseppe Naponiello <[hidden email]>:
Hi all,
I can't undarstand the problem:
server with debian 8, tomcat 8, geoserver 2.8, OpenLayers 2.13.
Apache run over https protocol, all proxy modules are enabled.
WMSGetFeatureInfo:
"info = new OpenLayers.Control.WMSGetFeatureInfo({
    title: 'Informazioni sui livelli interrogati',
    layers: [siti, vincoli, progetti, interventi, ind_neg],
    queryVisible: true,
    infoFormat:'application/json',
    format: new OpenLayers.Format.JSON,
    vendorParams: {buffer: 10},
    eventListeners: {
        getfeatureinfo: function(event) {
         var data = event.text;
         console.log(data);
        }
    }
});
map.addControl(info);
info.activate();"

...but when I click on map I read this error in firebug:
"Uncaught SyntaxError: Unexpected token #"

If I go on localhost/cgi-bin/proxy.cgi, I do not have the expected result but:
"#!/usr/bin/env python

"""This is a blind proxy that we use to get around browser
restrictions that prevent the Javascript from loading pages not on the
same server as the Javascript.  This has several problems: it's less
efficient, it might break some sites, and it's a security risk because
people can use this proxy to browse the web and possibly do bad stuff
with it.  It only loads pages via http and https, but it can load any
content type. It supports GET and POST requests."""

import urllib2
import cgi
import sys, os

# Designed to prevent Open Proxy type stuff.

......."
I probably forgot to install some library?
How to fix this annoying problem?!
Thanx
-beppe-
--
Giuseppe Naponiello

Arc-Team srl
piazza Navarrino, 13 - 38023Cles (TN) 
C.F. e P. IVA IT-01941600221 
cell.
 +393476846599
mail: [hidden email]
pec: [hidden email]
www.arc-team.com
http://arc-team-open-research.blogspot.it/



--
Giuseppe Naponiello

Arc-Team srl
piazza Navarrino, 13 - 38023Cles (TN) 
C.F. e P. IVA IT-01941600221 
cell.
 +393476846599
mail: [hidden email]
pec: [hidden email]
www.arc-team.com
http://arc-team-open-research.blogspot.it/



--
Giuseppe Naponiello

Arc-Team srl
piazza Navarrino, 13 - 38023Cles (TN) 
C.F. e P. IVA IT-01941600221 
cell.
 +393476846599
mail: [hidden email]
pec: [hidden email]
www.arc-team.com
http://arc-team-open-research.blogspot.it/

_______________________________________________
Users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/openlayers-users
Reply | Threaded
Open this post in threaded view
|

Re: OL 2.13 debian 8 geoserver 2.8 - problem with proxy.cgi

pjzgeo
Hi list

I want to comment: I have understood that using a proxy is insecure because anyone could navigate through it, doing harmful things! That opinion of this community there is to it?

I found solutions to cross-domain AJAX calls are:
1 - use a proxy server (not recommended)
2 - use a proxy on the client (as does GeoExplorer, but every client should have it implemented)
3 - in geoserver enable JSONP (this option seems the best)

I would like to know your opinions about it

Cheers

2015-10-07 6:22 GMT-03:00 Giuseppe Naponiello <[hidden email]>:
Sorry sorry sorry, apache cgi module was not enabled
Issue resolved!

2015-10-07 10:28 GMT+02:00 Giuseppe Naponiello <[hidden email]>:
...I forget an important information, in firebug network tab the query string parameters sounds correct, so if I point my browser on this string, I get the correct json array.

2015-10-07 10:00 GMT+02:00 Giuseppe Naponiello <[hidden email]>:
Hi all,
I can't undarstand the problem:
server with debian 8, tomcat 8, geoserver 2.8, OpenLayers 2.13.
Apache run over https protocol, all proxy modules are enabled.
WMSGetFeatureInfo:
"info = new OpenLayers.Control.WMSGetFeatureInfo({
    title: 'Informazioni sui livelli interrogati',
    layers: [siti, vincoli, progetti, interventi, ind_neg],
    queryVisible: true,
    infoFormat:'application/json',
    format: new OpenLayers.Format.JSON,
    vendorParams: {buffer: 10},
    eventListeners: {
        getfeatureinfo: function(event) {
         var data = event.text;
         console.log(data);
        }
    }
});
map.addControl(info);
info.activate();"

...but when I click on map I read this error in firebug:
"Uncaught SyntaxError: Unexpected token #"

If I go on localhost/cgi-bin/proxy.cgi, I do not have the expected result but:
"#!/usr/bin/env python

"""This is a blind proxy that we use to get around browser
restrictions that prevent the Javascript from loading pages not on the
same server as the Javascript.  This has several problems: it's less
efficient, it might break some sites, and it's a security risk because
people can use this proxy to browse the web and possibly do bad stuff
with it.  It only loads pages via http and https, but it can load any
content type. It supports GET and POST requests."""

import urllib2
import cgi
import sys, os

# Designed to prevent Open Proxy type stuff.

......."
I probably forgot to install some library?
How to fix this annoying problem?!
Thanx
-beppe-
--
Giuseppe Naponiello

Arc-Team srl
piazza Navarrino, 13 - 38023Cles (TN) 
C.F. e P. IVA IT-01941600221 
cell.
 +393476846599
mail: [hidden email]
pec: [hidden email]
www.arc-team.com
http://arc-team-open-research.blogspot.it/



--
Giuseppe Naponiello

Arc-Team srl
piazza Navarrino, 13 - 38023Cles (TN) 
C.F. e P. IVA IT-01941600221 
cell.
 +393476846599
mail: [hidden email]
pec: [hidden email]
www.arc-team.com
http://arc-team-open-research.blogspot.it/



--
Giuseppe Naponiello

Arc-Team srl
piazza Navarrino, 13 - 38023Cles (TN) 
C.F. e P. IVA IT-01941600221 
cell.
 +393476846599
mail: [hidden email]
pec: [hidden email]
www.arc-team.com
http://arc-team-open-research.blogspot.it/

_______________________________________________
Users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/openlayers-users



--
Pablo J. Zader
Lic. en Cs. de la Computación

"Los Grandes Hombres hablan sobre ideas...
 Los Hombres Promedio hablan sobre cosas...
 Los Hombres Pequeños hablan.. de otros Hombres.

del libro Matemática estas ahi? A. Paenza "

_______________________________________________
Users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/openlayers-users