Giter Site home page Giter Site logo

CORS about sentinel-tiler HOT 13 CLOSED

mapbox avatar mapbox commented on June 3, 2024
CORS

from sentinel-tiler.

Comments (13)

vincentsarago avatar vincentsarago commented on June 3, 2024

I think this happened with the new serverless release, can you confirm which version of serverless you are using ?
I may need to update https://github.com/vincentsarago/lambda-proxy which is handling the api-gateway integration.

from sentinel-tiler.

samsammurphy avatar samsammurphy commented on June 3, 2024
$ sls --version
1.26.0

I am going to try and play with this again over the weekend to see if I didn't miss something.

from sentinel-tiler.

samsammurphy avatar samsammurphy commented on June 3, 2024

One idea might be to add the following line

"Access-Control-Allow-Credentials" : true // Required for cookies, authorization headers with HTTPS

to here perhaps?

I am not at all familiar with lambda proxies though, so that is a bit of a guess. Again, will try testing over the wkd.

from sentinel-tiler.

vincentsarago avatar vincentsarago commented on June 3, 2024

@samsammurphy I can't reproduce this but with sls 1.26.1 (event with Access-Control-Allow-Credentials set or not) is your endpoint still up and running ?

from sentinel-tiler.

samsammurphy avatar samsammurphy commented on June 3, 2024

I had removed it.. new endpoint up

const sentinel_tiler_url = 'https://r1jzg3qt9c.execute-api.eu-central-1.amazonaws.com/dev'

there is no CORS error, but it still is hitting something.. hopefully will find more info to help diagnose..

from sentinel-tiler.

samsammurphy avatar samsammurphy commented on June 3, 2024

In the initScene() function there is a query for metadata on line 91.

Here is an example of one of my query urls:
https://r1jzg3qt9c.execute-api.eu-central-1.amazonaws.com/dev/sentinel/metadata/S2B_tile_20180303_17SMD_0?'pmim=5&pmax=95

here is part of a response from jquery .fail() when trying to $.getJSON such a query:

responseJSON: Object { errorMessage: "A defined coordinate reference system is required" }
responseText: "{\"errorMessage\": \"A defined coordinate reference system is required\"}"
setRequestHeader: function setRequestHeader()
state: function state()
status: 500
statusCode: function statusCode()
statusText: "Internal Server Error"

As you see the error message is "A defined coordinate reference system is required". I'm not sure why that error is raised. Any ideas?

from sentinel-tiler.

Dharnidharka avatar Dharnidharka commented on June 3, 2024

@samsammurphy I am running into the same issue "A defined coordinate reference system is required". Have you been able to figure out the cause? landsat-tiler works normally though.

from sentinel-tiler.

vincentsarago avatar vincentsarago commented on June 3, 2024

are you using the simple or custom build ?
if you are using the simple you need to remove https://github.com/mapbox/sentinel-tiler/blob/master/serverless.yml#L18
cc @samsammurphy @Dharnidharka

from sentinel-tiler.

Dharnidharka avatar Dharnidharka commented on June 3, 2024

@vincentsarago I am using the simple build. I'll make the suggested fix and get back to you. Thank you.

from sentinel-tiler.

Dharnidharka avatar Dharnidharka commented on June 3, 2024

@vincentsarago Removing the line has resolved the issue. Thanks a lot.

from sentinel-tiler.

vincentsarago avatar vincentsarago commented on June 3, 2024

no problem @Dharnidharka, btw just checked your web, seems you are doing great stuff, love to see what you'll do with sentinel-tiler :-)

sorry @samsammurphy I should have realized that 21 days ago 🤦‍♂️,

Feel free to close here if it also worked for you

from sentinel-tiler.

Dharnidharka avatar Dharnidharka commented on June 3, 2024

@vincentsarago Thank you. I recently started exploring satellite imagery and this tool is simply awesome. Will let you know if I manage to do something worthwhile on top of it :)

from sentinel-tiler.

samsammurphy avatar samsammurphy commented on June 3, 2024

🎉 that worked. thanks @vincentsarago !

from sentinel-tiler.

Related Issues (6)

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.