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

{ "error": "unauthorised" } if running behind nginx proxy manager #3251

Closed
1 task done
scropion86 opened this issue Nov 7, 2024 · 1 comment
Closed
1 task done

Comments

@scropion86
Copy link
Contributor

Are you using the latest version of the library?

  • I have checked and am using the latest version of the library.

What type of session are you experiencing this issue on?

Multi-device and I have set multiDevice to true in my config OR am using the --multi-device flag

What type of host account are you experiencing this issue on?

Personal account (normal)

Mode

EASY API/CLI

Current Behavior

hello, I am running the server in docker behind nginx proxy manager

here is my docker run command and config, note that I am using a volume holding the session.


2024-11-07T07:28:51.418183896Z Starting the application

2024-11-07T07:28:51.418460144Z Using version: latest

2024-11-07T07:28:51.418664699Z ./node_modules/@open-wa/wa-automate/bin/server.js --use-chrome --in-docker --qr-timeout 0 --popup --debug --force-port -w https://DOMAIN>COM/webhook/wa -p 8080 -k SOMEKEY--api-host https://MYDOMAIN>COM/ --host https://MYDOMAIN>COM/ --v

my nginx proxy manager config

{
  "id": 5,
  "created_on": "2024-11-05 09:54:21",
  "modified_on": "2024-11-05 09:56:42",
  "owner_user_id": 1,
  "domain_names": [
    "MYDOMAIN>COM"
  ],
  "forward_host": "openwa",
  "forward_port": 8080,
  "access_list_id": 0,
  "certificate_id": 6,
  "ssl_forced": true,
  "caching_enabled": false,
  "block_exploits": true,
  "advanced_config": "",
  "meta": {
    "letsencrypt_agree": false,
    "dns_challenge": false
  },
  "allow_websocket_upgrade": true,
  "http2_support": true,
  "forward_scheme": "http",
  "enabled": 1,
  "locations": [],
  "hsts_enabled": false,
  "hsts_subdomains": false
}

any request i made from the swagger docs or postman getting same error

{
  "error": "unauthorised"
}

image

Expected Behavior

No response

Steps To Reproduce

explained above

create() code OR full CLI command + CONFIG

No response

DEBUG INFO

{
  "WA_VERSION": "2.3000.1018010039",
  "WA_AUTOMATE_VERSION": "4.74.0",
  "BROWSER_VERSION": "Chrome/130.0.6723.58",
  "START_TS": 1730964593490,
  "RAM_INFO": "Total: 1.00 GB | Free: 0.44 GB",
  "PPTR_VERSION": "23.6.0",
  "LATEST_VERSION": true,
  "CLI": true,
  "PATCH_HASH": "3aa89",
  "LAUNCH_TIME_MS": 26017,
  "ACC_TYPE": "PERSONAL",
  "chats": 165,
  "messages": 36,
  "contacts": 1123,
  "isBiz": false,
  "isMd": true,
  "INSTANCE_ID": "30331257-06aa-4a56-8852-1bea0148ec0e"
}

Environment

- OS: Linux 5.15
- Node: 23.0.0
- npm: 10.9.0

Screenshots/Logs

No response

Anything else?

No response

@scropion86
Copy link
Contributor Author

i have found the answer after searching discord server, this might help if some one get the same issue in the future

here is the answer in discord https://discord.com/channels/661438166758195211/895256233039233024/1064925648684064929

and you need to set nginx proxy manager advance config underscores_in_headers on; like this

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant