-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ALIAS or HOST #996
Labels
Code
Issues related to the code structure and performance.
Comments
dbauszus-glx
added
the
Code
Issues related to the code structure and performance.
label
Nov 10, 2023
The origin header from the request object can be used instead of an ALIAS {
host: 'xyz-blog-dev.vercel.app',
'x-real-ip': '152.37.79.88',
'sec-fetch-user': '?1',
'sec-ch-ua-mobile': '?0',
'sec-fetch-site': 'same-origin',
'upgrade-insecure-requests': '1',
'cache-control': 'no-cache',
referer: 'https://geolytix.dev/blog/api/user/register?register=true',
'x-vercel-forwarded-for': '152.37.79.88',
'sec-ch-ua': '"Google Chrome";v="119", "Chromium";v="119", "Not?A_Brand";v="24"',
origin: 'https://geolytix.dev',
'sec-ch-ua-platform': '"Linux"',
'x-forwarded-host': 'xyz-blog-dev.vercel.app',
accept: 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7',
'content-security-policy': "default-src 'self'; base-uri 'self'; object-src 'self'; connect-src 'self' geolytix.github.io *.geolytix.net *.maptiler.com *.mapbox.com *.googleapis.com www.google-analytics.com api.github.com isoline.router.hereapi.com router.hereapi.com maps.googleapis.com unpkg.com cdn.jsdelivr.net data:; worker-src 'self' blob:; child-src 'self' blob:; frame-src 'self' www.google.com www.gstatic.com; form-action 'self'; style-src 'self' 'unsafe-inline' unpkg.com fonts.googleapis.com cdn.jsdelivr.net geolytix.github.io; font-src 'self' unpkg.com fonts.gstatic.com cdn.jsdelivr.net geolytix.github.io; script-src 'self' 'unsafe-inline' unpkg.com cdn.skypack.dev api.mapbox.com *.googleapis.com www.google.com www.gstatic.com cdn.jsdelivr.net www.google-analytics.com www.googletagmanager.com geolytix.github.io maps.googleapis.com blob:; img-src 'self' geolytix.github.io api.ordnancesurvey.co.uk *.tile.openstreetmap.org api.mapbox.com res.cloudinary.com *.global.ssl.fastly.net raw.githubusercontent.com cdn.jsdelivr.net gitcdn.xyz maps.googleapis.com 2.aerial.maps.ls.hereapi.com fonts.gstatic.com data:",
'x-vercel-ip-timezone': 'Europe/London',
'x-forwarded-for': '152.37.79.88',
'user-agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36',
'content-type': 'application/x-www-form-urlencoded',
'x-vercel-proxy-signature-ts': '1699984048',
cookie: 'GEOLYTIX XYZ/MAPP Blog_redirect=/blog?',
'x-vercel-ip-latitude': '51.5081',
forwarded: 'for=152.37.79.88;host=xyz-blog-dev.vercel.app;proto=https;sig=0QmVhcmVyIDFiZTA2MzY3ODBiM2NhNjk4YThlYjdkNDBlMTE0Yjc0ODY4M2I5YmU5MTEyYjY0NTNiZDZlMmM5MmFmNWJkYmQ=;exp=1699984048',
'x-vercel-deployment-url': 'dev-blog-n7a4actjb-geolytix1.vercel.app',
'x-frame-options': 'DENY',
'x-vercel-id': 'lhr1:lhr1::r2jks-1699983748835-fcf2b09696ff',
'x-content-type-options': 'nosniff',
'x-xss-protection': '1; mode=block',
'x-vercel-ip-longitude': '-0.1278',
'access-control-allow-headers': 'Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With',
'accept-language': 'en-US,en;q=0.9,de;q=0.8,es;q=0.7,gl;q=0.6,zh-CN;q=0.5,zh;q=0.4,en-GB;q=0.3',
'x-vercel-ip-country-region': 'ENG',
'x-vercel-ip-country': 'GB',
'x-forwarded-proto': 'https',
'content-length': '72',
'accept-encoding': 'gzip, deflate, br',
'sec-fetch-mode': 'navigate',
'x-vercel-proxied-for': '152.37.79.88',
'x-vercel-ip-city': 'City%20of%20Westminster',
'x-vercel-proxy-signature': 'Bearer 1be0636780b3ca698a8eb7d40e114b748683b9be9112b6453bd6e2c92af5bdbd',
'sec-fetch-dest': 'document',
connection: 'close'
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
process.env.ALIAS
is used to provide the host in email templates. I believe this to be a legacy env which may not be required anymore.`${req.headers.host.includes('localhost') && req.headers.host || process.env.ALIAS || req.headers.host}${process.env.DIR}`
The text was updated successfully, but these errors were encountered: