- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在 hunchentoot 上启用 CORS 时遇到了一些问题:
(hunchentoot:define-easy-handler (one-api :uri *one-endpoint*) ()
(when (boundp '*acceptor*)
(setf (hunchentoot:header-out "Access-Control-Allow-Origin") "*")
(setf (hunchentoot:header-out "Accept") "*/*")
(setf (hunchentoot:header-out "Access-Control-Allow-Headers") "Content-Type, Accept, Origin")
(setf (hunchentoot:header-out "Access-Control-Allow-Methods") "POST, GET, OPTIONS, PUT, DELETE")
(setf (hunchentoot:header-out "Access-Control-Allow-Origin") "*")
(setf (hunchentoot:content-type*) "text/html"))
(let* ((raw-data (hunchentoot:raw-post-data :force-text t)))
(funcall callback raw-data))))
最佳答案
以下对我有用:
(setf (header-out "Access-Control-Allow-Origin") "*")
(setf (header-out "Access-Control-Allow-Methods") "POST,GET,OPTIONS,DELETE,PUT")
(setf (header-out "Access-Control-Max-Age") 1000)
(setf (header-out "Access-Control-Allow-Headers") "x-requested-with, Content-Encoding, Content-Type, origin, authorization, accept, client-security-token")
(setf (header-out "Content-Type") "text/json")
关于common-lisp - Hunchentoot 启用 CORS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59178214/
SBCL 可以成功加载 hunchentoot。然而,CCL 报道称: ? (ql:quickload :hunchentoot) To load "hunchentoot": Load 1 ASDF
在我的 webapp 启动后的某个时候,我开始收到 Can't handle a new request, too many request threads already来自 hunchentoot
我正在使用 Cl-who、Hunchentoot 和 Common Lisp 开发一个需要处理客户订单的 Web 应用程序。因为他们显然可以订购不止一件商品,所以我认为 Checkbox 最有意义。但
如何在项目上启动 Hunchentoot?我查看了 Edi Weitz 的指南,一切顺利,直到安装完成。列出的教程要么被破坏,要么略过实际的服务器使用情况。 我有我的 asdf 文件,用 quickl
我网站的 URI 结构最近发生了巨大变化,我需要将所有旧页面重定向到它们对应的新页面。我有一个所有新旧 URI 对的虚线列表。目前我正在尝试为每个循环定义简单的处理程序: (let ((redirec
我想用 Hunchentoot 创建一个网络应用程序,其工作方式如下;客户端告诉服务器应用程序它对数据库中的某个表感兴趣。当表中发生更改时,服务器会推送此信息。我还没有研究过 WebSockets,因
目前,我正在使用 hunchentoot 为我自己的需要开发 2 个基于 Web 的工具。 在开始 hunchentoot 之前,我想用 let 设置一些特殊变量,以便在 hunchentoot 运行
我使用 hunchentoot 网络服务器,并在那里上传文件。它将文件存储到临时位置 (/tmp/hunchentoot/hunchentoot-XX),并将修改和创建日期设置为现在。如何获取收到的文
我正在学习 common lisp 并尝试使用 hunchentoot 开发网络应用。 使用下面的代码,我无法在浏览器上看到 retro-games 函数定义中定义的页面。我希望它由这个函数生成。 我
我知道如何使用 hunchentoot:post-parameter 在 hunchentoot 中处理单个文件上传,但是当我添加属性时 multiple ,即 .我得到了 (hunchentoot
Hunchentoot/cl-who 页面组合 我正在尝试将 hunchentoot 中的几页放在一起作为实验,但我遇到了意想不到的墙。例如,我有以下模板宏。 (defmacro page-templ
我在 hunchentoot 上启用 CORS 时遇到了一些问题: (hunchentoot:define-easy-handler (one-api :uri *one-endpoint*) (
我使用的是装有 Mac OS 10.5 和 SBCL 1.0.29 的 Intel Mac。我之前在这里做过 1.0 之前的 Hunchentoot 开发,所以我已经安装了它(通过 asdf-inst
我尝试基于 Hunchentoot 实现一个简单的帖子示例。 代码如下: (define-easy-handler (test :uri "/test") () (with-html-output
我正在使用 Hunchentoot 作为一个高流量数据库驱动的网络应用程序,它也依赖于网络套接字协议(protocol)和 http ajax 请求。当我使用 apache 基准测试我的应用程序时 a
Hunchentoot 文档指出: "The method for ACCEPTOR tries to serve a static file relative to it's ACCEPTOR-DO
我正在使用 Hunchentoot(在 SBCL 和 Linux 上)开发一个网络应用程序,通常我只是从 Emacs (SLIME) 运行它,但对于部署,我想要更容易自动化的东西。所以我想弄清楚 AS
我一直使用 define-easy-handler。我现在有一个新生成的 ssl 证书和关联的 pem 文件,但无法弄清楚 d-e-h 的 ssl 等价物是什么。 例如,我有: (hunchent
我正在编写一个需要 hunchentoot 网络服务器的网络应用程序。我几乎没有关于 hunchentoot 或任何 Web 服务器的工作知识,我想知道我用 Common Lisp 编写的应用程序如何
我已经用 ssl 设置了一个 hunchentoot 服务器。我希望将常规 http 请求重定向到 https。 似乎是 hunchentoot:define-easy-handler 的某种组合和
我是一名优秀的程序员,十分优秀!