Coder Social home page Coder Social logo

Comments (18)

tjwebb avatar tjwebb commented on May 22, 2024

This problem is extremely infuriating. No matter what I do, I cannot make carto use http instead of https.

from cartodb.

tjwebb avatar tjwebb commented on May 22, 2024

Can't figure it out. I resorted to a global s/https/http search-replace but that obviously broke just about everything. Help! I'd love to start work on Carto but this is a huge blocker right now... Thanks

from cartodb.

tjwebb avatar tjwebb commented on May 22, 2024

Set up on CartoDB on another machine (Ubuntu 12.04 fresh install) and having the same issue. Does anyone have any ideas for a fix?

from cartodb.

jmwenda avatar jmwenda commented on May 22, 2024

i had to change some of the map.js functions to force them to use http

from cartodb.

tjwebb avatar tjwebb commented on May 22, 2024

I tried messing in there as well but I always ended up breaking other things. Do you know specifically what you changed?

And I'm just as interested as to why the tile_protocol property as no effect. Seems like a bug.

from cartodb.

jmwenda avatar jmwenda commented on May 22, 2024

i know, it a pain in the ass, but i changed lib/assets/javascripts/cdb/src/geo/common.js and added
opts.tiler_protocol= "http"; after line55
https://github.com/CartoDB/cartodb.js/blob/develop/src/geo/common.js#L55 and also changed line 128 to return http

from cartodb.

tjwebb avatar tjwebb commented on May 22, 2024

Ok thanks, I'll try that. Do you know where opts.tiler_protocol is set initially?

from cartodb.

tjwebb avatar tjwebb commented on May 22, 2024

Ok I was able to make it work by hacking common.js. Thanks for the tip.

Now of course, I ran into another ignoring-my-configuration issue...

CartoDB/Windshaft-cartodb#60

from cartodb.

zqshen avatar zqshen commented on May 22, 2024

This also worked for me. Thanks!

from cartodb.

javisantana avatar javisantana commented on May 22, 2024

we internally work with http for development is as easy as change the configuration in config/app_config.yml

from cartodb.

tjwebb avatar tjwebb commented on May 22, 2024

Look at the other comments! Changing app_config does NOT work!

from cartodb.

javisantana avatar javisantana commented on May 22, 2024

@tkwebb this is my app_config.yml, to develop I use a checkout of cartodb code without any modification (i've removed some keys). Once you have it in config folder, restart the app (the rails app and the importer) and create/import a new table

defaults: &defaults
  debug_assets: true
  mandatory_keys:     [layer_opts, tile_host, tile_port, sql_api_domain, sql_api_endpoint, sql_api_port, varnish_management, redis]
  session_domain:     '.localhost.lan'
  secret_token:       'XXXXXXXXXX'
  account_host:       'localhost:3000'
  account_path:       '/account'
  tile_protocol:      'http'
  tile_host:          'localhost.lan'
  tile_port:          '8181'
  sql_api_protocol:   'http'
  sql_api_domain:     'localhost.lan'
  sql_api_endpoint:   '/api/v1/sql'
  sql_api_port:       8080
  api_requests_service_url: ''
  developers_host:    'http://developers.localhost.lan:3000'

  varnish_management:
    critical: true
    host: '127.0.0.1'
    port: 6082
    purge_command: 'url.purge'
    retries: 5
    timeout: 5
  redis:
    host: '127.0.0.1'
    port: 6379
  superadmin:
    username: "superadmin"
    password: "asdasd"













  layer_opts:
    public_opts: ["type", "active", "query", "opacity", "auto_bound", 
                  "interactivity", "debug", "visible", "tiler_domain", 
                  "tiler_port", "tiler_protocol", "sql_domain", "sql_port", 
                  "sql_protocol", "extra_params", "cdn_url", "table_name", 
                  "user_name", "style_version"]
    default_tile_styles:
      point: "{\n  marker-fill: #FF6600;\n  marker-opacity: 0.9;\n  marker-width: 12;\n  marker-line-color: white;\n  marker-line-width: 3;\n  marker-line-opacity: 0.9;\n  marker-placement: point;\n  marker-type: ellipse;\n  marker-allow-overlap: true;\n}"
      geometry: "{\n // points\n [mapnik-geometry-type=1] {\n    marker-fill: #FF6600;\n    marker-opacity: 1;\n    marker-width: 16;\n    marker-line-color: white;\n    marker-line-width: 3;\n    marker-line-opacity: 0.9;\n    marker-placement: point;\n    marker-type: ellipse;marker-allow-overlap: true;\n  }\n\n //lines\n [mapnik-geometry-type=2] {\n    line-color:#FF6600; \n    line-width:1; \n    line-opacity: 0.7;\n  }\n\n //polygons\n [mapnik-geometry-type=3] {\n    polygon-fill:#FF6600;\n    polygon-opacity: 0.7;\n    line-opacity:1;\n    line-color: #FFFFFF;\n   }\n }"
      polygon: "{\n  polygon-fill:#FF6600;\n  polygon-opacity: 0.7;\n  line-opacity:1;\n  line-color: #FFFFFF;\n}"
      multipolygon: "{\n  polygon-fill:#FF6600;\n  polygon-opacity: 0.7;\n  line-opacity:1;\n  line-color: #FFFFFF;\n}"
      multilinestring: "{\n  line-color:#FF6600;\n  line-width:1;\n  line-opacity: 0.7;\n}"
    data:
      kind: "carto"
      options:
        query:              ""
        opacity:            0.99
        auto_bound:         false
        interactivity:      "cartodb_id"
        debug:              false
        visible:            true
        tiler_protocol:      'http'
        tiler_domain:          'localhost.lan'
        tiler_port:          '8181'
        sql_domain:         "localhost.lan"
        sql_port:           "8080"
        sql_protocol:       "http"
        extra_params:       { cache_policy: 'persist' }
        cdn_url:            ""
        tile_style_history: []
        style_version:      "2.1.1"
      infowindow:
        template_name:      "table/views/infowindow_light"
    background:
      kind: "background"
      options: { color: '#ffffff' }
    base:
      kind: "tiled"
      options:
        visible:      true
        type:         "Tiled"
        urlTemplate:  "http://a.tiles.mapbox.com/v3/mapbox.mapbox-streets/{z}/{x}/{y}.png"
        name:         'Streets (Mapbox)'
        className:    "mapbox_streets"
        attribution:  "Mapbox <a href='http://mapbox.com/about/maps' target='_blank'>Terms &amp; Feedback</a>"
    gmaps:
      kind: "gmapsbase"
      options:
        base_type: "roadmap"
        style: ""
  cartodb_com_hosted: true
  cartodb_central_domain_name: 'cartodb.com'
  aws:
    s3:
      access_key_id: "test"
      secret_access_key: "test"
  assets:
    s3_bucket_name: "tests"
    max_file_size: 10485760 # 10.megabytes

development:
  <<: *defaults
  varnish_management:
    critical: false
    host: '127.0.0.1'
    port: 6082
    purge_command: 'url.purge'
    retries: 5
    timeout: 5

test:
  <<: *defaults


from cartodb.

tjwebb avatar tjwebb commented on May 22, 2024

I wouldn't have filed this bug if it were that easy. I've already tried that. Changing the setting it to http has no effect, thus my filing of this bug. Why doesn't it work for the other two posters in this thread either?

The only way to make it use http is to follow the instructions in this comment: #48 (comment)

from cartodb.

javisantana avatar javisantana commented on May 22, 2024

have you tried exactly the steps i described?

be careful because there are two places where http should be set and also you need to restart and create new tables. If you change the config file but you try to open tables already imported that is NOT going to work.

And believe me, we do NOT do any hack in cartodb.js to develop and I do develop using http

from cartodb.

tjwebb avatar tjwebb commented on May 22, 2024

Yes. I've also tried re-installing the entire database, clearing the cache,
clearing redis, and even clearing out my entire installation several times.
It does not work. For the third time: Look at the comments in this issue!
I'm not the only one with this problem. I'm glad it works for you, but it doesn't work for any of us.

On Mon, Dec 17, 2012 at 10:24 AM, javi santana [email protected]:

have you tried exactly the steps i described?

be careful because there are two places where http should be set and also
you need to restart and create new tables. If you change the config file
but you try to open tables already imported that is NOT going to work.

And believe me, we do NOT do any hack in cartodb.js to develop and I do
develop using http


Reply to this email directly or view it on GitHubhttps://github.com//issues/48#issuecomment-11445767.

from cartodb.

javisantana avatar javisantana commented on May 22, 2024

i already read the comments and the solution is there.

Do the following:

could you please paste me the json returned

this is what I get

{
total_entries: 2,
layers: [
{
options: {
style: null,
base_type: "roadmap"
},
kind: "gmapsbase",
infowindow: null,
id: 404,
order: 0
},
{
options: {
attribution: "CartoDB <a href='http://cartodb.com/attributions' target='_blank'>attribution</a>",
type: "CartoDB",
active: true,
query: null,
opacity: 0.99,
auto_bound: false,
interactivity: "cartodb_id",
interaction: true,
debug: false,
tiler_domain: "localhost.lan",
tiler_port: "8181",
tiler_protocol: "http",
sql_domain: "cartodb.com",
sql_port: "80",
sql_protocol: "http",
extra_params: {
cache_policy: "persist",
cache_buster: 1355741577109
},
cdn_url: "",
visible: true,
tile_style_history: [
....

from cartodb.

zqshen avatar zqshen commented on May 22, 2024

@javisantana I noticed that in the app_config.yml you not only have tiler_protocol in the top section, but also in the data section as:

data:
  kind: "carto"
  options:
    query:              ""
    opacity:            0.99
    auto_bound:         false
    interactivity:      "cartodb_id"
    debug:              false
    visible:            true
    tiler_protocol:      'http'
    tiler_domain:          'localhost.lan'
    tiler_port:          '8181'
    sql_domain:         "localhost.lan"
    sql_port:           "8080"
    sql_protocol:       "http"
    extra_params:       { cache_policy: 'persist' }
    cdn_url:            ""
    tile_style_history: []
    style_version:      "2.1.1"
  infowindow:
    template_name:      "table/views/infowindow_light"

How do these work together with the tiler_protocol in the default section? Should we change all of them? What about tiler_domain? It is "cartodb.com" in the original app_config.yml.

from cartodb.

javisantana avatar javisantana commented on May 22, 2024

@zqshen you should change in all the places and all the variables you need to fit your system config (tiler_protocol, tiler_domain, tiler_port and sql variables if you need). The variables should be the same in the top section and in the data section

We are working to remove those duplicities

from cartodb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.