Giter Club home page Giter Club logo

Comments (9)

alex-phillips avatar alex-phillips commented on May 26, 2024 2

@sentriz Great! Thanks for the update! Looking forward to the merge.

from gonic.

sentriz avatar sentriz commented on May 26, 2024

can you try a curl --head "https://gonic.yourdomain.com/rest/getAlbum.view" there should be cors headers in the response.

I think it's set up right because gonic works with jamstash which probably does cors stuff (but maybe not?)

from gonic.

alex-phillips avatar alex-phillips commented on May 26, 2024

Hmm, it does. Not sure what the issue is then. Here's the response from my gonic server vs my airsonic server:

Airsonic:

curl --head "https://airsonic.mydomain.com/rest/getAlbum.view?f=json&c=qooxtunes&v=1.15&u=USERNAME&s=OaUSpg&t=TOKEN&id=2"
HTTP/1.1 200 
Server: nginx/1.16.1
Date: Sun, 01 Dec 2019 16:58:41 GMT
Content-Type: application/json;charset=UTF-8
Content-Length: 7653
Connection: keep-alive
Set-Cookie: JSESSIONID=10F426E45CEC8640F5853E3FB4760CC0; Path=/; Secure; HttpOnly
Access-Control-Allow-Origin: *
Set-Cookie: player-61646d696e=4; Max-Age=31536000; Expires=Mon, 30-Nov-2020 16:58:41 GMT; Path=/; HttpOnly
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: SAMEORIGIN

gonic

curl --head "https://gonic.mydomain.com/rest/getAlbum.view?f=json&c=qooxtunes&v=1.15&u=USERNAME&s=OaUSpg&t=TOKEN&id=2"
HTTP/1.1 200 OK
Server: nginx/1.16.1
Date: Sun, 01 Dec 2019 16:59:05 GMT
Content-Type: application/json
Content-Length: 115
Connection: keep-alive
Access-Control-Allow-Headers: Accept, Content-Type, Content-Length, Accept-Encoding, X-CSRF-Token, Authorization
Access-Control-Allow-Methods: POST, GET, OPTIONS, PUT, DELETE
Access-Control-Allow-Origin: *

Any ideas what could be missing / different to cause this issue?

from gonic.

sentriz avatar sentriz commented on May 26, 2024

hmm really not sure to be honest because the only header your thingy was complaining about CORS header ‘Access-Control-Allow-Origin’ missing
seems to be there

is your client open source? maybe I could try locally

from gonic.

alex-phillips avatar alex-phillips commented on May 26, 2024

It is: https://github.com/alex-phillips/qooxtunes

For ease of use, you can spin it up in docker with the following:

version: '3'
services:
  qooxtunes:
    container_name: qooxtunes
    image: alexphillips/qooxtunes
    ports:
      - 80:80
      - 443:443

from gonic.

alex-phillips avatar alex-phillips commented on May 26, 2024

Just FYI - the UI mimics old school iTunes, so it makes a TON of API calls to the backend server on startup to get the entire library worth of information (depending on the size of your library). Just fair warning :-P

from gonic.

alex-phillips avatar alex-phillips commented on May 26, 2024

Have you had a chance to check this out? I can send you a link of my running UI instance if that'll help troubleshoot.

from gonic.

sentriz avatar sentriz commented on May 26, 2024

hi! sorry it's taken so long. I grabbed qooxtunes (looks very cool)

it seems the cors errors were only happening for views which are implemented yet (getStarred) because my NotFoundHandler (for the subsonic code 70) wasn't using the cors, or any other middleware.

funnily enough, this is already fixed on this branch:
https://github.com/sentriz/gonic/tree/param_refactor

which I hope to merge very shortly. see #14

from gonic.

sentriz avatar sentriz commented on May 26, 2024

hey that change should be on docker hub now. please re-open or make a new issue if something else has gone wrong. thanks!

from gonic.

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.