My Servers Error > Unraid API • CORS Error


Go to solution Solved by ljm42,

Recommended Posts

I'm guessing you're running a reverse proxy? That isn't currently supported but is coming.

 

First, go to the plugins tab and make sure the My Servers plugin is up to date.

 

Then open a web terminal and run:
  unraid-api report -vv
If you look in the ALLOWED_ORIGINS area it will tell you which urls are supported. If the url you are using is not in that list then you will get the CORS error.

 

Note that the command above has -vv, which is non-anonymized data that you probably don't want to post. If you have questions, you can post anonymized data from:

  unraid-api report -v

 

Link to comment

Nope, no RP -yet that is. I do plan on going there once I get the hang of it.

 

Plugin is up to date

image.thumb.png.fbe4e9f7db1153778264764186af62d5.png

 

 

report contents looked ok to me too

<-----UNRAID-API-REPORT----->
SERVER_NAME: KNOXX
ENVIRONMENT: production
UNRAID_VERSION: 6.9.2
UNRAID_API_VERSION: 2.46.3 (running)
NODE_VERSION: v14.15.3
API_KEY: valid
MY_SERVERS: authenticated
MY_SERVERS_USERNAME: aglyons
RELAY: connected
MOTHERSHIP: ok
ONLINE_SERVERS: KNOXX[owner="aglyons"]
OFFLINE_SERVERS:
ALLOWED_ORIGINS: http://localhost, http://192.168.XXX.XXX, https://192.168.XXX.XXX, http://knoxx, https://knoxx, http://knoxx.local, https://knoxx.local
HAS_CRASH_LOGS: no
</----UNRAID-API-REPORT----->

 

Link to comment

Nope, changing that in the Management section of the settings page didn't even change the tld that UnRaid responds to.

 

image.png.3533bec5cc0cd00865cdbf20a6239be1.png

 

<-----UNRAID-API-REPORT----->
SERVER_NAME: KNOXX.lyons
ENVIRONMENT: production
UNRAID_VERSION: 6.9.2
UNRAID_API_VERSION: 2.46.3 (running)
NODE_VERSION: v14.15.3
API_KEY: valid
MY_SERVERS: authenticated
MY_SERVERS_USERNAME: aglyons
RELAY: connected
MOTHERSHIP: ok
ONLINE_SERVERS: KNOXX[owner="aglyons"]
OFFLINE_SERVERS:
ALLOWED_ORIGINS: http://localhost, http://IPV4ADDRESS, https://IPV4ADDRESS, http://knoxx, https://knoxx, http://knoxx.local, https://knoxx.local
HAS_CRASH_LOGS: no
</----UNRAID-API-REPORT----->

 

Link to comment
  • Solution

Hmm, the unraid-api should have noticed when you changed the Local TLD, I'll look into that. Please run these two commands:

/usr/local/emhttp/plugins/dynamix.my.servers/scripts/makestate
unraid-api restart

(no need to paste the output here)

 

Then run the report again and it should have the lyons url listed in the allowed origins.

 

Link to comment
  • 2 months later...
On 5/19/2022 at 7:54 PM, ljm42 said:

I'm guessing you're running a reverse proxy? That isn't currently supported but is coming.

 

First, go to the plugins tab and make sure the My Servers plugin is up to date.

 

Then open a web terminal and run:
  unraid-api report -vv
If you look in the ALLOWED_ORIGINS area it will tell you which urls are supported. If the url you are using is not in that list then you will get the CORS error.

 

Note that the command above has -vv, which is non-anonymized data that you probably don't want to post. If you have questions, you can post anonymized data from:

  unraid-api report -v

 

Are there any news about when the support for a reverse proxy is coming?

I guess that we can still make it work by matching the local TLD with the public domain, right?

Thank you

Link to comment