Server Error (500) stellar.toml issue

Create issue
Issue #3 resolved
Former user created an issue


I new to this having issue, with stellar.toml. I can see it However when I test in (Test your federation) I get the server Error (500) message.

I've put a single line .htaccess in the stellar.toml file as below

Header add Access-Control-Allow-Origin "*"

I haven't locked the asset, I've not trusted any anchors, neither have I complete (Transaction 6: Token Distribution Account: distribution account Operations:

Manage Offer - Sell:)

could this be the issue?

any help would me much appreciated.

Regards Nathanofzion

Comments (3)

  1. Francois Rejete repo owner
    • changed status to open

    OK, so it's true that this is a bug on my side because I should not show a server error when fed with a mis-formatted TOML file. I will fix this with a nicer error message.

    Now the real source of the issue is actually your file 😉

    That piece of markup should not be in the TOML file:

    <Location "/.well-known/stellar.toml">
      Header set Access-Control-Allow-Origin "*"

    It should be in a .htaccess file in the root of your website. As it is right now your TOML file is invalid and will break every Stellar transaction that references it.

  2. Nathanofzion

    Hello Francois

    Thank you very much for clearing this up, I now verified on the fed server. I was using the .htaccess in the toml fold. I thought I had an issue updating the root .htaccess as its for wp but it seems I can put put code at the end. and it work fine see below e.g.

    (Please note this is for wordpress site, on linux platform running Apache) locate root .htaccess code:

    # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase // RewriteRule ^index.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . index.php [L] </IfModule>

    END WordPress

    <IfModule mod_headers.c> Header set Access-Control-Allow-Origin * </IfModule>

    Hope this helps someone else too

  3. Log in to comment