0

I use nx to build react apps and deploy it to vercel. I am able to generate .well-known folder with stellar.toml file inside it and then reference it in index.html like this:

<!DOCTYPE html>
<html
    lang="en"
    clasName="h-full">
    <head>
        ...

        <meta
            name="viewport"
            content="width=device-width, initial-scale=1" />
        <link
            rel="stellar.toml file"
            href="%PUBLIC_URL%/.well-known/stellar.toml" />

        ...

    </head>
    <body className="h-full">
        <div id="root"></div>
    </body>
</html>

The deployment is successful, but any time I want to display the file when entering {domain}/.well-known/stellar.toml it's prompting me to download it instead of displaying it in the tab.

I am using react-router also in case it's better to do it with react-router. Is there a way to just display it instead of the download prompt?

Drew Reese
  • 165,259
  • 14
  • 153
  • 181
  • Sorry, *what* file are you trying to display instead of download? – Drew Reese Jan 11 '23 at 04:23
  • It's stellar.toml file – Lukas Luke Stateczny Jan 11 '23 at 04:27
  • And what would you be displaying? Are you trying to have your React app fetch/load this file, or does React have nothing to do with the `head` tag? It's unclear what you are expecting the code to do. – Drew Reese Jan 11 '23 at 04:29
  • Sorry for being unclear. For example if you enter `https://stellar.org/.well-known/stellar.toml` the .toml file will display the values inside. Similar to .json file I would like similarly to enter my domain with the route /.well-known/stellar.toml to also display the file values like the above link. However at the moment when I enter that route on my domain it prompts the download of that file instead of displaying the values in it. – Lukas Luke Stateczny Jan 11 '23 at 04:32

0 Answers0