mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-26 23:25:56 -05:00
force ie not to cache .xml files
This commit is contained in:
parent
08ddf8a24a
commit
eb7d0e7e0d
@ -88,12 +88,13 @@ static void config_content_type(WS_CONNINFO *pwsc, char *path);
|
||||
typedef struct tag_contenttypes {
|
||||
char *extension;
|
||||
char *contenttype;
|
||||
int decache;
|
||||
} CONTENTTYPES;
|
||||
|
||||
CONTENTTYPES config_default_types[] = {
|
||||
{ ".css", "text/css; charset=utf-8" },
|
||||
{ ".txt", "text/plain; charset=utf-8" },
|
||||
{ ".xml", "text/xml; charset=utf-8" },
|
||||
{ ".css", "text/css; charset=utf-8", 0 },
|
||||
{ ".txt", "text/plain; charset=utf-8", 0 },
|
||||
{ ".xml", "text/xml; charset=utf-8", 1 },
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
||||
@ -172,6 +173,11 @@ void config_content_type(WS_CONNINFO *pwsc, char *path) {
|
||||
if(pct->extension) {
|
||||
ws_addresponseheader(pwsc,"Content-Type",pct->contenttype);
|
||||
}
|
||||
|
||||
if(pct->decache) {
|
||||
ws_addresponseheader(pwsc,"Cache-Control","no-cache");
|
||||
ws_addresponseheader(pwsc,"Expires","-1");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user