Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

240
Views
¿Cómo modificar el archivo index.html en la carpeta de compilación antes de enviarlo en cada solicitud con el servidor Nginx?

Quiero modificar el archivo index.html de React en el servidor antes de enviarlo al navegador a pedido. La razón es que quiero incluir metaetiquetas de gráficos abiertos en el encabezado de acuerdo con la URL de la solicitud. ¿Cómo puedo lograr eso con el servidor Nginx?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Un par de opciones aquí.

Usar el módulo de subs NGINX

http://nginx.org/en/docs/http/ngx_http_sub_module.html

sub_filter '<a href="http://127.0.0.1:8080/' '<a href="https://$host/';

Usar NGINX njs

http://nginx.org/en/docs/http/ngx_http_js_module.html#js_body_filter

Puede usar njs y js_body_filter para filtrar el cuerpo de la respuesta. Personalmente, usaría la forma njs ya que es más flexible para agregar/cambiar datos.

Asegúrese de cargar ngx_http_js_module en su archivo principal nginx.conf.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!