Commit d659f90b authored by Remi Cresson's avatar Remi Cresson
Browse files

Revert "1st commit"

This reverts commit 26b55200.
parent 26b55200
No related merge requests found
Pipeline #42757 passed with stage
in 1 minute and 5 seconds
Showing with 2 additions and 14 deletions
+2 -14
FROM ubuntu/apache2
RUN apt update && apt install --no-install-recommends -y libapache2-mod-oauth2 && apt-get clean && rm -rf /var/lib/apt/lists/*
RUN a2enmod headers
RUN a2enmod oauth2
RUN sed -i 's#Require all granted#Require valid-user#g' /etc/apache2/apache2.conf
RUN sed -i 's#<Directory /var/www/>#<Directory /var/www/>\n OAuth2TokenVerify introspect \${TOKEN_ENDPOINT} introspect.ssl_verify=false\&introspect.auth=client_secret_basic\&client_id=\${CLIENT_ID}\&client_secret=\${CLIENT_SECRET}#g' /etc/apache2/apache2.conf
RUN sed -i 's#<Directory /var/www/>#<Directory /var/www/>\n AuthType oauth2#g' /etc/apache2/apache2.conf
RUN sed -i 's#<Directory /var/www/>#<Directory /var/www/>\n Header set Access-Control-Allow-Origin "*"#g' /etc/apache2/apache2.conf
RUN sed -i 's#<Directory /var/www/>#<Directory /var/www/>\n SetEnv TOKEN_ENDPOINT ${TOKEN_ENDPOINT}#g' /etc/apache2/apache2.conf
RUN sed -i 's#<Directory /var/www/>#<Directory /var/www/>\n SetEnv CLIENT_ID ${CLIENT_ID}#g' /etc/apache2/apache2.conf
RUN sed -i 's#<Directory /var/www/>#<Directory /var/www/>\n SetEnv CLIENT_SECRET ${CLIENT_SECRET}#g' /etc/apache2/apache2.conf
RUN echo 'export TOKEN_ENDPOINT=${TOKEN_ENDPOINT}' >> /etc/environment && \
echo 'export CLIENT_ID=${CLIENT_ID}' >> /etc/environment && \
echo 'export CLIENT_SECRET=${CLIENT_SECRET}' >> /etc/environment
RUN echo ". /etc/environment" >> /etc/apache2/envvars
RUN a2enmod headers
# Apache2 CORS + OAuth2
# Apache2 CORS
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment