'How do upload the Loader.io verification token in a Strapi app?
We have an app built with Strapi, let's say, https://my-strapi-app.com
I want to load testing of the application
For that, I went with Loader.io
Now before loader.io can start sending the load to the app, I need to verify that the website belongs to me.
For that Loader.io ask me to place a verification token that is accessible via one of the following links:
- https://my-strapi-app.com/loaderio-c56xxxxx.txt
- https://my-strapi-app.com/loaderio-c56xxxxx.html
- https://my-strapi-app.com/loaderio-c56xxxxx/
What steps can I take to make the verification token accessible at any one of the above URL?
Solution 1:[1]
Although it's a bit late, and I have no experience with Strapi (I use Flask / Python), but if anyone still looking for the answer, here is my "Flask" way solution:
@app.route("/your-loader-io-token/"), methods=["GET"])
def loader_io_verify():
return send_from_directory("/path-of-the-txt-file", "your-loader-io-token.txt", as_attachment=True)
Basically, it will just download the "your-loader-io-token.txt" file, when someone access url "https://your-website.com/your-loader-io-token/".
That's it :D !
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | kyo144 |