Giter Club home page Giter Club logo

Comments (10)

benphelps avatar benphelps commented on May 18, 2024

I've added the option to proxy the API requests,

widget:
  type: pihole
  url: http://pi.hole
  proxy: true # this will enable the CORS proxy

from homepage.

id-ic avatar id-ic commented on May 18, 2024

I'm getting follow error when I have proxy on or off.
The Same Origin Policy disallows reading the remote resource at http://10.10.10.10/admin/api.php. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Status code: 200.

config

    - Pihole:
        icon: pihole.png
        href: http://10.10.10.10/admin
        descriptition: Pihole Server
        widget:
          type: pihole
          url: http://10.10.10.10
          #proxy: true # Optional, only use if it doesn't work otherwise

UPDATE: Sorry, Production outage. Brain not working. Fix words

from homepage.

chrisg991 avatar chrisg991 commented on May 18, 2024

I've added the option to proxy the API requests,

widget:
  type: pihole
  url: http://pi.hole
  proxy: true # this will enable the CORS proxy

Thanks for looking at this so quickly. I've pulled the latest version and am not getting an internal server error when I try and load the page. (This is with or without the proxy:true line).

The container logs are giving the following information:

TypeError: handler is not a function
    at Server.<anonymous> (/app/server.js:19:11)
    at Server.emit (node:events:513:28)
    at parserOnIncoming (node:_http_server:980:12)
    at HTTPParser.parserOnHeadersComplete (node:_http_common:128:17)

from homepage.

benphelps avatar benphelps commented on May 18, 2024

It was an unrelated bug, which has been fixed now.

from homepage.

chrisg991 avatar chrisg991 commented on May 18, 2024

It was an unrelated bug, which has been fixed now.

Thanks!

from homepage.

jbeck22 avatar jbeck22 commented on May 18, 2024

I'm still getting the API error. I have tried to target the IP and port directly (http://192.168.1.254/admin) and I have tried with the proxy setting set to true and still nothing.

from homepage.

benphelps avatar benphelps commented on May 18, 2024

What version of PiHole are you running?

from homepage.

jbeck22 avatar jbeck22 commented on May 18, 2024

What version of PiHole are you running?

v5.18.1

from homepage.

jbeck22 avatar jbeck22 commented on May 18, 2024

I'm getting a similar error with the SAB API call:

TypeError [ERR_INVALID_URL]: Invalid URL at new NodeError (node:internal/errors:393:5) at URL.onParseError (node:internal/url:564:9) at new URL (node:internal/url:644:5) at genericProxyHandler (/app/.next/server/pages/api/services/proxy.js:379:19) at async Object.apiResolver (/app/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/server/api-utils/node.js:366:9) at async NextNodeServer.runApi (/app/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/server/next-server.js:469:9) at async Object.fn (/app/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/server/next-server.js:719:37) at async Router.execute (/app/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/server/router.js:247:36) at async NextNodeServer.run (/app/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/server/base-server.js:346:29) at async NextNodeServer.handleRequest (/app/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/server/base-server.js:284:20) { input: 'undefined/api/?apikey=d164c44b2bbffd08c7f731990e25fc2d&output=json&mode=queue', code: 'ERR_INVALID_URL' }

from homepage.

github-actions avatar github-actions commented on May 18, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion for related concerns.

from homepage.

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.