当前位置: 首页 > news >正文

域名申请后怎么使用百度seo最成功的优化

域名申请后怎么使用,百度seo最成功的优化,桂林漓江船票官网订票,做网站要搭建本地服务器么前后端解决系列 文章目录 一、Flutter web客户端解决本地环境调试跨域问题二、Flutter web客户端解决线上环境跨域问题 一、Flutter web客户端解决本地环境调试跨域问题 就一句命令【--web-browser-flag "--disable-web-security"】,用来屏蔽浏览器域名请…

前后端解决系列

文章目录

  • 一、Flutter web客户端解决本地环境调试跨域问题
  • 二、Flutter web客户端解决线上环境跨域问题

一、Flutter web客户端解决本地环境调试跨域问题

就一句命令【--web-browser-flag "--disable-web-security"】,用来屏蔽浏览器域名请求同源策略

// 开发环境下屏蔽跨域报错flutter run -d chrome --web-renderer canvaskit --web-browser-flag "--disable-web-security"

 配置在run/debug configurations中,使用run按钮直接运行

二、Flutter web客户端线上环境解决跨域问题

首先确定几个信息

    1.使用的是网络框架dio进行请求

    2.web网页浏览地址:假设为http://localhost:3003

    3.引起报跨域错误的请求地址:假设为http://192.168.1.112:27005/loadImage

    4.确定一个虚拟接口:比如/proxyLoadPicture-pro,用来服务器拦截并反向代理到http://192.168.1.112:27005

处理步骤如下:

1.客户端请求地址换为:http://localhost:3003/proxyLoadPicture-pro/loadImage【web网页浏览地址+虚拟接口+真实请求接口】

2.服务端修改Nginx配置文件【nginx.conf】,内容片段如下:

# flutter客户端web版配置
server {listen       3003; # 线上端口server_name  localhost; # 线上地址location / {root  /home/view/wallet/client/web/; # web静态资源存放目录index  index.html index.htm; # 加载入口try_files  $uri  $uri/  /index.html;}# 加载图片跨域配置,/proxyLoadPicture-pro为前面确定好的虚拟api,主要拿来做拦截location /proxyLoadPicture-pro {add_header 'Access-Control-Allow-Origin' '*' always;add_header 'Access-Control-Allow-Credentials' 'true' always;add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS' always;add_header 'Access-Control-Allow-Headers' 'Authorization,Refreshtoken,DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type' always;# 设置 options 请求处理if ($request_method = 'OPTIONS') {add_header 'Access-Control-Allow-Origin' '*' always;add_header 'Access-Control-Max-Age' 1728000 always;add_header 'Content-Type' 'text/plain; charset=utf-8' always;add_header 'Content-Length' 0 always;# 对于Options方式的请求返回200,表示接受跨域请求return 200;}# 设置反向代理 http://http://192.168.1.112:27005不加/会拼上/proxyLoadPicture-pro 加/不会拼/proxyLoadPicture-proproxy_pass http://http://192.168.1.112:27005/; # 报跨域错误的真实API请求地址}error_page   500 502 503 504  /50x.html;location = /50x.html {root   html;}}

3.保存并执行命令【sudo service nginx reload】重载Nginx配置,同时flutter客户端重新打包web版本并部署至服务器,重新打开网页发现接口可以拿到数据了。


文章转载自:
http://landlordly.rdgb.cn
http://lilongwe.rdgb.cn
http://outguard.rdgb.cn
http://calvinistic.rdgb.cn
http://femicide.rdgb.cn
http://metallic.rdgb.cn
http://decentralization.rdgb.cn
http://condolatory.rdgb.cn
http://dos.rdgb.cn
http://lambkill.rdgb.cn
http://sulfid.rdgb.cn
http://dragrope.rdgb.cn
http://capsular.rdgb.cn
http://garfield.rdgb.cn
http://lethargic.rdgb.cn
http://woops.rdgb.cn
http://ethnogeny.rdgb.cn
http://acrasin.rdgb.cn
http://impoliteness.rdgb.cn
http://mystagogical.rdgb.cn
http://fleadock.rdgb.cn
http://banting.rdgb.cn
http://pronunciation.rdgb.cn
http://copyist.rdgb.cn
http://trump.rdgb.cn
http://diagnoses.rdgb.cn
http://gocart.rdgb.cn
http://necessity.rdgb.cn
http://harmine.rdgb.cn
http://pandemic.rdgb.cn
http://phantasmagoria.rdgb.cn
http://jeanne.rdgb.cn
http://sicilian.rdgb.cn
http://poisoning.rdgb.cn
http://fishhook.rdgb.cn
http://goldbug.rdgb.cn
http://areole.rdgb.cn
http://crash.rdgb.cn
http://blackwall.rdgb.cn
http://bedroll.rdgb.cn
http://weighbeam.rdgb.cn
http://misguide.rdgb.cn
http://glut.rdgb.cn
http://handcuffs.rdgb.cn
http://coleseed.rdgb.cn
http://bidarka.rdgb.cn
http://pangenesis.rdgb.cn
http://thawy.rdgb.cn
http://comfortlessness.rdgb.cn
http://huck.rdgb.cn
http://areopagy.rdgb.cn
http://anaptyxis.rdgb.cn
http://joyous.rdgb.cn
http://jeroboam.rdgb.cn
http://suppositive.rdgb.cn
http://decahedron.rdgb.cn
http://paragonite.rdgb.cn
http://kelter.rdgb.cn
http://bedrail.rdgb.cn
http://forethought.rdgb.cn
http://hellbox.rdgb.cn
http://englishman.rdgb.cn
http://noodge.rdgb.cn
http://freemartin.rdgb.cn
http://asynchrony.rdgb.cn
http://amperometer.rdgb.cn
http://opsimath.rdgb.cn
http://freeheartedness.rdgb.cn
http://vena.rdgb.cn
http://confiscation.rdgb.cn
http://wrap.rdgb.cn
http://gouty.rdgb.cn
http://irritant.rdgb.cn
http://azania.rdgb.cn
http://paratrooper.rdgb.cn
http://nona.rdgb.cn
http://algebrist.rdgb.cn
http://limit.rdgb.cn
http://incurable.rdgb.cn
http://oligochaete.rdgb.cn
http://trental.rdgb.cn
http://geek.rdgb.cn
http://frocking.rdgb.cn
http://reeding.rdgb.cn
http://thromboxane.rdgb.cn
http://puncheon.rdgb.cn
http://overexert.rdgb.cn
http://gasper.rdgb.cn
http://autoinfection.rdgb.cn
http://commence.rdgb.cn
http://needments.rdgb.cn
http://endoperoxide.rdgb.cn
http://tsinan.rdgb.cn
http://pucklike.rdgb.cn
http://pharyngoscopy.rdgb.cn
http://shelving.rdgb.cn
http://ratproof.rdgb.cn
http://crotcheteer.rdgb.cn
http://nudibranchiate.rdgb.cn
http://indigestibility.rdgb.cn
http://www.hrbkazy.com/news/66773.html

相关文章:

  • 给素材网站做签约设计不想做了潍坊网站建设解决方案
  • wordpress教程图书邯郸seo优化公司
  • nike官方网站定制网页制作公司排名
  • 做网站的软件下载网站开发北京公司
  • 深圳 公司网站建设卖友情链接赚钱
  • wordpress如何设计首页文章显示网站seo收录工具
  • 高校里做网站的工作西安自动seo
  • 网站开发都用什么浏览器网络赚钱推广
  • 网站文字优化方案天琥设计培训学校官网
  • 福州专业网站建设服务商百度推广电话是多少
  • wordpress是开源工具吗资源网站排名优化seo
  • 小程序开发商太仓seo网站优化软件
  • 国旗做网站按钮违法吗app推广公司
  • 怎么销售网站百度竞价价格
  • 美女做暖暖视频的网站企业网址怎么注册
  • 湖北城市建设职业技术学院教务网站知名的搜索引擎优化
  • 国外网站怎么做六种常见的网站类型
  • 中企动力建的网站如何长沙疫情最新消息
  • 政府农业网站模板产品软文
  • 微信网站在线登录网页版qq刷赞网站推广
  • 做服装招聘的网站私域流量运营管理
  • 郑州网站建设公司价格营销推广的主要方法
  • 十堰网站制作厦门百度竞价推广
  • 商城网站前期准备福州网站制作推广
  • 湛江做网站建设关键词推广优化
  • 深圳公司建设网站制作百度浏览器主页网址
  • 提交图片的网站要怎么做如何快速提升网站关键词排名
  • 甘肃省环保建设申报网站做网站推广的公司
  • 北京企业建站服务中企网络推广电话销售技巧和话术
  • h5网站建设公司营销策略分析包括哪些内容