Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Request to renew session does not work behind nginx reverse proxy & subpath #1857

Closed
axelabs opened this issue Apr 22, 2015 · 3 comments
Closed
Labels
Milestone

Comments

@axelabs
Copy link

axelabs commented Apr 22, 2015

I'm using grafana 2.0.1 from the deb package. It is proxied behind nginx with a /grafana prefix as noted here. It works but there is a bug when invalid users try to login. It seems that your JS has url:"/api/login/ping" hardcoded and does not use the updated root_url. See JS console for details:

grafana-no-ping

Changing the url in app.6b375424.js to "/grafana/api/login/ping" resolves the issue. It would be nice to have it recognize the prefix automatically instead.

@torkelo torkelo changed the title CSS does not use root_url and can't ping behind re-written proxy API Request to renew session does not work behind nginx reverse proxy & subpath Apr 23, 2015
@torkelo
Copy link
Member

torkelo commented Apr 23, 2015

thanks for reporting this, fixed!

You can get daily builds for the patch release here: http://grafana.org/download/builds
look for build 2.0.3-pre1

@torkelo torkelo added this to the 2.0.3 milestone Apr 23, 2015
@davidak
Copy link
Contributor

davidak commented May 21, 2015

we use grafana behind an apache reverse proxy and get a similar error from time to time:

bildschirmfoto 2015-05-21 um 12 19 55

Response:

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>404 Not Found</title> </head><body> <h1>Not Found</h1> <p>The requested URL /api/login/ping was not found on this server.</p> <hr> <address>Apache/2.4.7 (Ubuntu) Server at ********** Port 443</address> </body></html>

when will 2.0.3 get released?

@torkelo
Copy link
Member

torkelo commented May 21, 2015

@davidak not sure when it will be released. You can download a build of the 2.0.x branch here http://grafana.org/download/builds.html (label 2.0.3-pre1)

johann8384 added a commit to johann8384/grafana that referenced this issue Jul 9, 2015
* v2.0.x: (1178 commits)
  New direct query text box Add a brand new opentsdb M panel Create new module and controller for opentsdbM Add a drop down to select function Change some style for textbox Add opentsdb M function explanations
  Create pid file before runtime init, Fixes grafana#1990
  Fixed XSS issue with file based dashboards, was really casued by an issue with alertSrv accepting html in message alerts
  fixed version in package.json
  Updated config sample.ini with oauth allow_sign_up
  Corrected SQL migration for snapshot table column type change, grafana#1880
  fixes grafana#1880 dashboard_snapshot table does not have a data column
  fixes grafana#1880 correct mysql statement for modifying column data type
  updated version to 2.1.0-pre1
  Replaced slug dependency with one that did not use gopkgs.com
  Firefox/IE issue, invisible text in dashboard search fixed, Fixes grafana#1872
  Added units for voltage, current and frequency
  Documented units for timepicker
  Restored sql integration tests to use in mem sqlite3
  MySQL: Dashboard.data column type changed to mediumtext (sql migration added), Fixes grafana#1863
  Fix and update documents
  /api/login/ping Fix for issue when behind reverse proxy and subpath, Fixes grafana#1857
  Remove exit 0 at the end of init.d script
  Updated install docs with 2.0.2 version
  updated changelog
  ...

Conflicts:
	public/app/panels/graph/module.js
	public/app/plugins/datasource/opentsdb/datasource.js
	src/app/controllers/all.js
	src/app/partials/graphite/editor.html
	src/app/partials/opentsdb/editor.html
	src/app/services/datasourceSrv.js
	src/app/services/panelSrv.js
	src/css/less/grafana.less
	src/css/less/panel.less
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants