Dear Manish!
Could you please share the file with mime types that you use to include
in a map?
manish-ezest wrote in post #1155024:
> Hello Wandenberg,
>
> Thanks for your help. Finally it is working. I included all the mime
> types
> in a file and included inside map directive and used it in the
Hello Wandenberg,
Thanks for your help. Finally it is working. I included all the mime types
in a file and included inside map directive and used it in the location / {}
directive with proxy hide parameter like you suggested.
--Manish
Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,239
I wrote a module to process the problem
ena.https://github.com/flygoast/ngx_http_types_filter
our configuration in production like this:
location / {
types_filter $uri;
..
proxy_pass http://down_server;
}
At 2014-08-09 10:34:06,manish-ezest wrote:
>Hello Wandenberg,
>
>Yes, t
Hello Wandenberg,
Yes, the back-end(s3 bucket) is sending Content-Type header for each request
and what I heard from the developers that the header is must for the site to
work properly.
The issue started when I got the request of enabling content-type header of
all the json files to application
One question, your backend are sending the content-type header if you made
the request to it?
If yes, the value is right?
If not, I think the problem is on backend configuration.
You can set it on the nginx using the map like I suggest, but will have to
add all possible file types on the map, like
Hello wandenberg,
This procedure is not working for internet explorer. The CSS are not loading
properly. so we have to somehow get the Content-Type in the header. Is there
anything we can use?
--Manish
Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,239473,252416#msg-252416
__
Hi Wandenberg,
Is there any way to show the Content-Type in the header as well?
--Manish
Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,239473,252396#msg-252396
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinf
Hi Wandenberg,
As you suggested I added "proxy_hide_header Content-Type;" in location / {}
directive and I am getting 200 but how would I check what is the
Content-Type. I usually check with curl command. But with curl command I
don't find the Content-Type since it is hidden now. Is there any oth
Did you tried to only hide the header with
proxy_hide_header Content-Type;
and let nginx use the mime.types to set the content type?
Do not set the add_header Content-Type manually.
Let me know the result.
On Thu, Aug 7, 2014 at 12:57 PM, manish-ezest wrote:
> Hello wandenberg,
>
> Thank you
Hello wandenberg,
Thank you for your response. I truly appreciate your help. I tried this
options given below
##First Method###
1. Edit nginx.conf and add
map $uri $custom_content_type {
default "text/html";
~(.*\.json)$ "application/json";
}
2. Put the cu
Hello,
you can use many values on the map, take a look on its docs.
One quickly example may be (not tested)
map $uri $custom_content_type {
default "text/html";
~(.*\.json)$ "application/json";
}
location ~ \.json$ {
proxy_hide_header Content-Type;
add_header Content-Typ
Hello All,
Can somebody answer this question? I am facing this issue from many days.
--Manish
Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,252360,252378#msg-252378
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/li
Please refer this page
http://forum.nginx.org/read.php?2,239473,252358#msg-252358
Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,252360,252360#msg-252360
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Hello Appa,
I am having the same issue. I want NGINX to serve all the json file from
upstream as a content type of application/json.I tried with map just like
you suggested but I am not able to figure out what should be inside map(That
you have written below), Can you please suggest?
map $upstrea
Thanks for the reply!!
This approach can be a good solution.
I wonder if this can affect the server perfomance.
Another solution could be to create a location for each file extension that
only adds the correct Content-Type header.
This is certainly less maintainable than a map, but is it better f
Oops it's $upstream_http_content_type instead. Should read:
map $upstream_http_content_type $s3_content_type {
# S3 -> real...
}
appa
On Thu, May 23, 2013 at 5:24 PM, António P. P. Almeida wrote:
> Try this.
>
> At the http level define a map directive that maps upstream Content-Type
Try this.
At the http level define a map directive that maps upstream Content-Types
to the correct ones.
map $upstream_content_type $s3_content_type {
# S3 -> real...
}
On the location that proxy passes.
proxy_hide_header Content-Type;
add_header Content-Type $s3_content_type;
appa
Here's a thread I started on this a while back. I didn't get any replies.
http://mailman.nginx.org/pipermail/nginx/2011-September/029344.html
Jonathan
--
Jonathan Matthews // Oxford, London, UK
http://www.jpluscplusm.com/contact.html
___
nginx mailing
Hi !!
i have a Nginx server that operates as a reverse proxy to a my bucket in
Amazon S3.
Amazon S3 service could deliver contents with wrong Content-Type header,
so i would like to override this header by referring to file extension.
In other servers i have just configured the "types" block wit
19 matches
Mail list logo