未指定应用程序加密密钥(反应)
Posted
技术标签:
【中文标题】未指定应用程序加密密钥(反应)【英文标题】:No application encryption key has been specified (react) 【发布时间】:2021-10-24 10:23:23 【问题描述】:我的 api 在 PostMan 中工作,但没有反应并显示此错误
未指定应用程序加密密钥
fetch(URL,
method: 'post',
headers:
Accept: 'application/json',
'Content-Type': 'application/x-www-form-urlencoded',
'Content-Language': 'en', ,
body: formUrlEncoded(data),
)
【问题讨论】:
在你的控制台中使用这个命令`php artisan key:generate`这将生成应用程序密钥,然后你就可以使用它了。 请求头的key怎么填? 它会自动设置。试试这个命令,你会看到需要的结果 【参考方案1】:你可以使用:
php artisan key:generate
php artisan serve
或
php artisan key:generate --env=testing
【讨论】:
您可能对这个主题感兴趣:***.com/questions/44839648/…以上是关于未指定应用程序加密密钥(反应)的主要内容,如果未能解决你的问题,请参考以下文章
将 laravel 应用程序部署到共享主机并得到“未指定应用程序加密密钥”。错误
production.ERROR:Laravel 中未指定应用程序加密密钥