{"action":"created","issue":{"url":"https://api.github.com/repos/jfurrow/flood/issues/427","repository_url":"https://api.github.com/repos/jfurrow/flood","labels_url":"https://api.github.com/repos/jfurrow/flood/issues/427/labels{/name}","comments_url":"https://api.github.com/repos/jfurrow/flood/issues/427/comments","events_url":"https://api.github.com/repos/jfurrow/flood/issues/427/events","html_url":"https://github.com/jfurrow/flood/issues/427","id":249828565,"number":427,"title":"baseURI breaks flood","user":{"login":"marcel-st","id":4158605,"avatar_url":"https://avatars3.githubusercontent.com/u/4158605?v=4","gravatar_id":"","url":"https://api.github.com/users/marcel-st","html_url":"https://github.com/marcel-st","followers_url":"https://api.github.com/users/marcel-st/followers","following_url":"https://api.github.com/users/marcel-st/following{/other_user}","gists_url":"https://api.github.com/users/marcel-st/gists{/gist_id}","starred_url":"https://api.github.com/users/marcel-st/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcel-st/subscriptions","organizations_url":"https://api.github.com/users/marcel-st/orgs","repos_url":"https://api.github.com/users/marcel-st/repos","events_url":"https://api.github.com/users/marcel-st/events{/privacy}","received_events_url":"https://api.github.com/users/marcel-st/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2017-08-12T18:43:03Z","updated_at":"2017-08-22T19:43:06Z","closed_at":null,"body":"Setting the baseURI parameter in config.js to anything else then \"/\" flood won't load to the login screen. The web interface says it succeeded in \r\n\r\nAuthentication Status\r\nFlood Settings\r\n\r\nbut then it keeps waiting for something.\r\n\r\nDuring the website loading the URL rewrites back from http://<fqdn>:3000/<baseURI> to http://<fqdn>:3000/overview, effectively removing the baseURI setting from the URL in the browser.\r\n\r\nHere is what NodeJS shows:\r\n$ npm start\r\n> flood@1.0.0 start /opt/flood\r\n> node server/bin/www\r\nGET /flood 200 327.112 ms - 667\r\nGET /style.css 304 2.660 ms - -\r\nGET /app.js 304 3.136 ms - -\r\nGET /flood/auth/verify?1502563159849 200 59.415 ms - 667\r\nGET /fonts/Roboto-regular/Roboto-regular.woff2 304 1.097 ms - -\r\nGET /fonts/Roboto-500/Roboto-500.woff2 304 0.969 ms - -\r\nGET /flood/api/activity-stream?historySnapshot=fiveMin 200 56.154 ms - 667\r\nGET /fonts/Roboto-italic/Roboto-italic.woff2 304 1.075 ms - -\r\nGET /fonts/Roboto-700/Roboto-700.woff2 304 0.750 ms - -\r\nGET /flood/api/client/settings 200 34.012 ms - 667\r\nGET /flood/api/settings 200 23.943 ms - 667\r\n\r\nAnd my config file\r\n$ cat config.js \r\nconst CONFIG = {\r\n  baseURI: '/flood',\r\n  dbCleanInterval: 1000 * 60 * 60,\r\n  dbPath: './server/db/',\r\n  floodServerHost: '192.168.0.25',\r\n  floodServerPort: 3000,\r\n  maxHistoryStates: 30,\r\n  pollInterval: 1000 * 5,\r\n  secret: 'flood',\r\n  scgi: {\r\n    socket: true,\r\n    socketPath: '/home/marcel/rpc.socket',\r\n  },\r\n  ssl: false,\r\n  sslKey: '/absolute/path/to/key/',\r\n  sslCert: '/absolute/path/to/certificate/',\r\n  torrentClientPollInterval: 1000 * 2\r\n};\r\n"},"comment":{"url":"https://api.github.com/repos/jfurrow/flood/issues/comments/324131128","html_url":"https://github.com/jfurrow/flood/issues/427#issuecomment-324131128","issue_url":"https://api.github.com/repos/jfurrow/flood/issues/427","id":324131128,"user":{"login":"Sparticuz","id":161913,"avatar_url":"https://avatars3.githubusercontent.com/u/161913?v=4","gravatar_id":"","url":"https://api.github.com/users/Sparticuz","html_url":"https://github.com/Sparticuz","followers_url":"https://api.github.com/users/Sparticuz/followers","following_url":"https://api.github.com/users/Sparticuz/following{/other_user}","gists_url":"https://api.github.com/users/Sparticuz/gists{/gist_id}","starred_url":"https://api.github.com/users/Sparticuz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sparticuz/subscriptions","organizations_url":"https://api.github.com/users/Sparticuz/orgs","repos_url":"https://api.github.com/users/Sparticuz/repos","events_url":"https://api.github.com/users/Sparticuz/events{/privacy}","received_events_url":"https://api.github.com/users/Sparticuz/received_events","type":"User","site_admin":false},"created_at":"2017-08-22T19:43:06Z","updated_at":"2017-08-22T19:43:06Z","body":"I'm using nginx\r\n\r\nnginx.conf:\r\n````\r\n location /flood {\r\n                include proxy_params;\r\n                proxy_pass http://127.0.0.1:3000;\r\n        }\r\n````\r\nproxy_params.conf:\r\n````\r\nproxy_set_header        Host                    $host;\r\nproxy_set_header        X-Real-IP               $remote_addr;\r\nproxy_set_header        X-Forwarded-For         $proxy_add_x_forwarded_for;\r\nproxy_set_header        X-Forwarded-Host        $server_name;\r\n\r\n# Used by Cherry-Py (different versions look for different headers)\r\nproxy_set_header        X-Forwarded-Proto       $scheme;\r\nproxy_set_header        X-Forwarded-Ssl         on;\r\n````\r\n(Some of those params are for other apps)"}}
{"actor":{"display_login":"Sparticuz"}}