Comments (4)
This is my nginx configuration:
server {
listen 80;
server_name closic.com;
return 301 https://www.closic.com$request_uri;
}
server {
listen 80;
server_name ~^(?<subdomain>.+)\.closic\.com$;
return 301 https://$subdomain.closic.com$request_uri;
}
server {
listen 443 ssl;
server_name www.closic.com;
ssl_certificate /usr/local/nginx/ssl/www.closic.com/server.chained.crt;
ssl_certificate_key /usr/local/nginx/ssl/www.closic.com/server.key;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-NginX-Proxy true;
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:4000;
proxy_redirect off;
}
}
server {
listen 443 ssl;
server_name api.closic.com;
ssl_certificate /usr/local/nginx/ssl/api.closic.com/server.chained.crt;
ssl_certificate_key /usr/local/nginx/ssl/api.closic.com/server.key;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-NginX-Proxy true;
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:3000;
proxy_redirect off;
}
}
server {
listen 3101 ssl;
server_name api.closic.com;
ssl_certificate /usr/local/nginx/ssl/api.closic.com/server.chained.crt;
ssl_certificate_key /usr/local/nginx/ssl/api.closic.com/server.key;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-NginX-Proxy true;
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:3102;
proxy_redirect off;
}
}
from prerender-node.
It seems that prerender is requesting the server using http.
prerender-5 2016-01-04T01:51:54.111Z getting http://www.closic.com/pt
Nginx redirects this url to https url.
How to tell prerender to request the https url?
from prerender-node.
Wherever you are sending the request to Prerender.io, you'll want to set the protocol to https. It sounds like you might be doing SSL termination in front of your server so that's why you're sending Prerender.io a request to an http URL.
from prerender-node.
OK @thoop, the problem was the proxy_pass to http://127.0.0.1:4000. I solved changing the node server running on 4000 to use https. Thanks!
from prerender-node.
Related Issues (20)
- how can we judge that the bot is not requesting a resource?
- Add msnbot for results with "Fetch as bingbot"
- Ungzipping gzipped response from prerender service produces corrupted unicode strings HOT 1
- Cloudflare caches pre-rendered response HOT 1
- request dependency has been deprecated HOT 2
- Add hacktoberfest topic
- webp is missing in extensionsToIgnore HOT 1
- Circular redirect while page prerendering HOT 1
- Prerender.io's cached html header getting replaced by static header
- Access denied or empty body
- fastify missing middleware
- How to check for X-Prerender:1 using Express middleware
- [Feature Request] May include a bot detection library rather than a self maintained list? HOT 1
- Add new user agents to every known middleware and docs HOT 7
- Request for changelogs HOT 1
- Provide typescript type definitions HOT 2
- Not working under Meteor 2.5.3 HOT 5
- `req.connection.encrypted` is `undefined` in node:14 HOT 1
- Fastify support?
- Could not find a declaration for module "prerender-node" HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prerender-node.