承接 prof/cors-helper 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

prof/cors-helper

Composer 安装命令:

composer require prof/cors-helper

包简介

This library is to enable cross site origin sharing

README 文档

README

..............HOW TO USE CORS-HELPER............. STEP 1:In the root folder of your file run this command composer require prof/cors-helper STEP 2:put this at the top of all your code | require DIR.'/vendor/autoload.php'; STEP 3: place this immediately after the above line | use CorsHelper\CorsHelper; STEP 4: Call function like this CorsHelper::GrantRequest(); This is how the default set up look like,you did not need to do this below set up,am just showing you how the default set up look like. ......THIS IS THE DEFAULT SETUP...... CorsHelper::GrantRequest([ 'origin'=>['All origin'], 'method'=>['POST','GET','DELETE','PUT','PATCH','OPTIONS'], 'header'=>['X-Requested-With','token','Authorization','X-Auth-Token','Origin','Content-Type','Cache-Control','Pragma','Accept','Accept-Encoding'], 'contentType'=>'text/plain'; 'credentials'=>true; 'maxAge'=>72800, ]) .......FULL DEFAULT EXAMPLE...... require DIR.'/vendor/autoload.php'; use CorsHelper\CorsHelper; CorsHelper::GrantRequest(); So simple cors is enable and you can start your work without any cors problem. NOTE:if you want to customize cors-helper,you can reset the above setup to your taste.

统计信息

  • 总下载量: 61
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-07-29

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固