Skip to content
This repository was archived by the owner on Dec 3, 2018. It is now read-only.

Conversation

@springmeyer
Copy link
Contributor

Companion to #1215.

This is intended to allow testing vtiles produced by Studio locally against mapbox-gl-js styles like:

{
  "sources": {
    "sourcename": {
      "type": "vector",
      "maxzoom": 14,
      "tiles": ["http://localhost:3001/source/{z}/{x}/{y}.vector.pbf?id=tmsource:///path/to/sourcename.tm2source"]
     }
  }
  [ .. snip ... ]
}}

@springmeyer
Copy link
Contributor Author

@yhahn question: I already see cors() used in the routes for the tile requests (https://github.com/mapbox/mapbox-studio/blob/mb-pages/lib/server.js#L110-L116). Could it be that those are not working as expected or are they not at all related to providing cors headers?

@yhahn
Copy link
Member

yhahn commented Mar 3, 2015

Hrm yes, maybe a candidate for http request/response testing territory : )

@springmeyer
Copy link
Contributor Author

Could it be that those are not working as expected or are they not at all related to providing cors headers?

Got to the bottom of this: the cors() middleware works on successful requests but on 404's it never kicks in which makes it look like it is not working while debugging.

@springmeyer springmeyer closed this Mar 7, 2015
@springmeyer springmeyer deleted the cors-for-vtiles branch March 7, 2015 21:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants