torchlight-laravel icon indicating copy to clipboard operation
torchlight-laravel copied to clipboard

Option to ignore Torchlight when there's a missing token

Open jasonvarga opened this issue 3 years ago • 1 comments

Is it possible to disable the exceptions when there's a missing token?

For example, we have a documentation site that people will want to contribute to. When contributors run the site locally, if they don't add an API token, they'll run into an exception.

We can work around this by either setting the app environment to production, or make our token available to everyone, but those both feel dangerous.

jasonvarga avatar Feb 03 '22 16:02 jasonvarga

I had this issue too and solved by checking if an API token is sett in the config, then dynamically adding the Torchlight middleware it in the HTTP Kernel and dynamically adding the extension to the CommonMark parser.

emmadesilva avatar Mar 12 '22 18:03 emmadesilva