我有一个feathers.js服务,在使用post时我需要重定向到特定的页面
class Payment {
// ..
create(data, params) {
// do some logic
// redirect to an other page with 301|302
return res.redirect('http://some-page.com');
}
}
是否存在从feathers.js服务重定向的可能性?
您可以指定仅重定向到https的两个页面的商店/大学,但这不会重定向样式css / js文件。这段代码可以工作,但同时也会出现很多错误:
Mixed Content: The page at 'https://www.example.com/shop/' was loaded over HTTPS, but requested an insecure stylesheet 'http://www.example.com/wp-includes/css/admin-bar.min.css?ver=4.4'. This request has been bloc
我希望能够在不使用Express或其他第三方库的情况下设置cookie,然后使用node.js重定向客户端。在网上,我只能找到使用Express的示例。
当我尝试设置cookie并重定向客户端时,未设置cookie。但是当我注释掉重定向res.writeHead(301, {Location: serverAddress});时,cookie就设置好了,但是没有重定向。
那么,如何设置cookie,然后使用直接node.js重定向客户端呢
var fs = require("fs");
var http = require('http');
var home