Git Product home page Git Product logo

Comments (7)

haochuan9421 avatar haochuan9421 commented on July 24, 2024

有些小伙伴可能会看到这样的告警:
image

UEditor 作为一款富文本编辑器,包含图片上传、视频上传、远程图片抓取等功能。这需要部署对应的后端服务,才能正常使用。

正确部署后的 UEditor 服务,一般会提供一个统一的 HTTP 请求接口,前端同学只需要把他配置到 UEDITOR_CONFIG.serverUrl 中即可。

文档里提供了一个测试的 serverUrl https://ueditor.zhenghaochuan.com/cos ,后台日志显示访问量很大,已经吃掉了我服务器很多费用😂,这个接口是我个人搭建的,初衷是为了方便各位小伙伴看文档或开发时能更好的体验百度编辑器的完整功能,完全是出于帮助他人的初衷且免费的。

image

由于我设置了允许跨域访问,发现有很多人在线上环境白嫖我的接口😡😡😡,这不仅对我造成了额外的经济负担,也占用其他同学的资源!所以对疑似线上环境的调用进行了告警,此前文档也三番五次强调这个 serverUrl 仅供测试使用,不可用于生产环境!
image
image

为了更好的防止此类事情发生,现同一 IP 最多只能调用一百次,超过后自动加入黑名单,这个次数对于体验 serverUrl 的功能已经足够了。

对于需要使用上传图片等功能的同学,UEditor 官方已经提供了 PHP、ASP、ASP.NET、JSP 的部署说明,我也提供一个 Node 的示例代码,事实上我提供了那个 serverUrl 就是 Node 写的。再次强调:拒绝白嫖!!!自己动手,丰衣足食!

from vue-ueditor-wrap.

woyehaizaixiang avatar woyehaizaixiang commented on July 24, 2024

已将serverUrl设置为空关闭alert警告,上传文件、图片等功能通过oss实现了

from vue-ueditor-wrap.

dg-jj avatar dg-jj commented on July 24, 2024

大佬 请问你的跨域问题怎么处理的 我这边遇到跨域问题

Indicate whether a cookie is intended to be set in a cross-site context by specifying its SameSite attribute

from vue-ueditor-wrap.

haochuan9421 avatar haochuan9421 commented on July 24, 2024

大佬 请问你的跨域问题怎么处理的 我这边遇到跨域问题

Indicate whether a cookie is intended to be set in a cross-site context by specifying its SameSite attribute

你这个跨域请求设置了第三方Cookie,之前我写过一篇相关的博客,你可以了解一下 https://juejin.cn/post/6963632513914765320

from vue-ueditor-wrap.

Lny-nice avatar Lny-nice commented on July 24, 2024

工具栏很多工具失效咋回事啊

from vue-ueditor-wrap.

cjh-store avatar cjh-store commented on July 24, 2024

已将serverUrl设置为空关闭alert警告,上传文件、图片等功能通过oss实现了

是否有代码示例看看怎么实现的呢 遇到相同需求

from vue-ueditor-wrap.

woyehaizaixiang avatar woyehaizaixiang commented on July 24, 2024

已将serverUrl设置为空关闭alert警告,上传文件、图片等功能通过oss实现了

是否有代码示例看看怎么实现的呢 遇到相同需求

可以参考这个,主要是24540行代码开始
https://github.com/woyehaizaixiang/vue-ueditor/blob/master/ueditor.all.min.js

from vue-ueditor-wrap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.