https://dev-eole.ac-dijon.fr/https://dev-eole.ac-dijon.fr/favicon.ico2017-02-14T17:01:38ZEnsemble Ouvert Libre ÉvolutifEWT - Tâche #19143: Etudier les possibilités (configuration nginx, apache, ...)https://dev-eole.ac-dijon.fr/issues/19143?journal_id=876082017-02-14T17:01:38ZBruno Boigetbruno.boiget@ac-dijon.fr
<ul><li><strong>Statut</strong> changé de <i>Nouveau</i> à <i>En cours</i></li><li><strong>Assigné à</strong> mis à <i>Bruno Boiget</i></li><li><strong>% réalisé</strong> changé de <i>0</i> à <i>60</i></li></ul><p>début de travail sur la configuration nginx (branche feature/19142_externalapps dans eole-ead3)</p>
<p>Nécessite d'installer nginx-extras pour avoir accès à la directive sub_string (modification des URLS à la volée dans le contenu).</p>
<ul>
<li>exemple de configuration pour sympa :</li>
</ul>
<pre>
# external url for the action 'sympa'
location /ead/sympa/ {
proxy_pass http://192.168.0.24:8787/;
index wws;
# change security headers to allow display in iframe (same origin)
proxy_hide_header X-Frame-Options;
proxy_hide_header content-security-policy;
add_header X-Frame-Options "SAMEORIGIN";
add_header content-security-policy "frame-ancestors 'self'";
# disable encoding on proxied application because
# sub_filter does not work on gzippe'd content
proxy_set_header Accept-Encoding "";
# check if user is allowed to access application
auth_request /auth_ead_sympa;
# add "/ewtapp/name" for every href/action in app
sub_filter ' href="/' ' target="_self" href="/ead/sympa/';
sub_filter ' action="/' ' target="_self" action="/ead/sympa/';
sub_filter ' src="/' ' target="_self" src="/ead/sympa/';
sub_filter_once off;
}
location = /auth_ead_sympa {
proxy_method POST;
proxy_set_header Accept "application/json";
proxy_set_header Content-Type "application/json";
proxy_pass http://127.0.0.1:8880/;
# pass parameters to called function to check perms for each URL ?
proxy_set_body '[{"fun":"ead.sympa_ping", "client":"local", "tgt":"local"}]';
}
</pre>
<p>Fonctionne si on utilise comme l'url <strong>/ead/sympa/wws</strong> dans l'iframe de l'action au lieu de /ead/sympa/ . Nécessite des modifications pour permettre que l'url appelée puisse être une sous-url de celle gérée par la directive proxy_pass. J'ai aussi essayé en utilisant 'index wws' mais ça ne semble pas marcher.</p>
<p>Si on sert directement <a class="external" href="http://192.168.0.24:8787/wws">http://192.168.0.24:8787/wws</a>, on ne peut pas servir les fichiers statiques.</p>
<ul>
<li>exemple de configuration pour cups :</li>
</ul>
<pre>
# external url for the action 'cups'
location /ead/cups/ {
proxy_pass http://localhost:631/;
# change security headers to allow display in iframe (same origin)
proxy_hide_header X-Frame-Options;
proxy_hide_header content-security-policy;
add_header X-Frame-Options "SAMEORIGIN";
add_header content-security-policy "frame-ancestors 'self'";
# disable encoding on proxied application because
# sub_filter does not work on gzippe'd content
proxy_set_header Accept-Encoding "";
# check if user is allowed to access application
auth_request /auth_ead_cups;
# add "/ewtapp/name" for every href/action in app
sub_filter ' href="/' ' target="_self" href="/ead/cups/';
sub_filter ' action="/' ' target="_self" action="/ead/cups/';
sub_filter ' src="/' ' target="_self" src="/ead/cups/';
sub_filter_once off;
}
location = /auth_ead_cups {
proxy_method POST;
proxy_set_header Accept "application/json";
proxy_set_header Content-Type "application/json";
proxy_pass http://127.0.0.1:8880/;
# pass parameters to called function to check perms for each URL ?
proxy_set_body '[{"fun":"ead.cups_ping", "client":"local", "tgt":"local"}]';
}
</pre>
<p>fonctionne mais cups 'sort' systématiquement de l'iframe à chaque changement de page (même en forçant la 'target' des liens sur l'iframe).</p> EWT - Tâche #19143: Etudier les possibilités (configuration nginx, apache, ...)https://dev-eole.ac-dijon.fr/issues/19143?journal_id=893062017-03-02T08:45:54ZLohysia MOUETTE
<ul><li><strong>Statut</strong> changé de <i>En cours</i> à <i>Reporté</i></li></ul>