I need to get the complete URL in express to make the authorization callback.
The technology used by the front desk is: angular1+ui-router.
The full URL of the current page is http://www.aaa.com/wechat#! /list
expressThe URL obtained in it is: http://www.aaa.com/wechat
The method is:
var currentPage = 'http://' + req.headers.host + req.originalUrl; // Get the current request path
I looked at it as if the server could not get the value of hash. The value of.Hash is for browsers.
expressCan you get a complete URL or what packages can be obtained?
Using html5Mode directly, the URL behind hash will not be able to get through the request header at the server side.
If you don’t use html5Mode, it’s on the front end
location.hashThe value is sent to the back end.