在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):funkhaus/wp-graphql-cors开源软件地址(OpenSource Url):https://github.com/funkhaus/wp-graphql-cors开源编程语言(OpenSource Language):PHP 83.2%开源软件介绍(OpenSource Introduction):WP GraphQL CORSThe primary purpose of this plugin is to make the WP GraphQL plugin authentication "just work". It does this by allowing you set the CORS headers that GraphQL will accept, which means that WordPress's default authentication cookies will be accepted. This means that if a user is logged into WordPress, they will be able to see things like draft and private pages/posts via GraphQL. Features
Installation
Now if the browser is currently logged into WordPress, WP GraphQL will allow access to authenticated data. DocumentationIf all you want to do is allow draft, private and page previews to be viewed from the frontend, setting You'll also need to config your GraphQL client (probably Apollo) to include credentials in requests. Generally this is a setting under Logout MutationIf enabled in the settings, WP GraphQL will have a new mutation available to allow a user to logout. This is useful if you want to build a "logout" button on a sites frontend.
Login MutationIf enabled in the settings, WP GraphQL will have a new mutation available to allow a user to login.
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论