mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-28 10:53:40 +03:00
Set up swagger-ui in the docker compose (port 8000)
This commit is contained in:
parent
1eadda64c5
commit
007145e213
3 changed files with 24 additions and 13 deletions
|
@ -82,14 +82,12 @@ header('X-Frame-Options: SAMEORIGIN');
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] === 'OPTIONS')
|
header('Access-Control-Allow-Origin: *'); // NOTICE: Change this header to restrict CORS access.
|
||||||
{
|
|
||||||
header('Access-Control-Allow-Origin: *');
|
|
||||||
|
|
||||||
if (isset($_SERVER['HTTP_ACCESS_CONTROL_REQUEST_METHOD']))
|
if (isset($_SERVER['HTTP_ACCESS_CONTROL_REQUEST_METHOD']))
|
||||||
{
|
{
|
||||||
// May also be using PUT, PATCH, HEAD etc
|
// May also be using PUT, PATCH, HEAD etc
|
||||||
header('Access-Control-Allow-Methods: GET, POST, PUT, PATCH, DELETE, OPTIONS');
|
header('Access-Control-Allow-Methods: GET, POST, PUT, PATCH, DELETE, OPTIONS, HEAD');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_SERVER['HTTP_ACCESS_CONTROL_REQUEST_HEADERS']))
|
if (isset($_SERVER['HTTP_ACCESS_CONTROL_REQUEST_HEADERS']))
|
||||||
|
@ -97,6 +95,8 @@ if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] === 'OPTIONS
|
||||||
header('Access-Control-Allow-Headers: ' . $_SERVER['HTTP_ACCESS_CONTROL_REQUEST_HEADERS']);
|
header('Access-Control-Allow-Headers: ' . $_SERVER['HTTP_ACCESS_CONTROL_REQUEST_HEADERS']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] === 'OPTIONS')
|
||||||
|
{
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,3 +42,13 @@ services:
|
||||||
ports:
|
ports:
|
||||||
- '8025:8025'
|
- '8025:8025'
|
||||||
- '1025:1025'
|
- '1025:1025'
|
||||||
|
|
||||||
|
swagger-ui:
|
||||||
|
platform: linux/amd64
|
||||||
|
image: swaggerapi/swagger-ui
|
||||||
|
ports:
|
||||||
|
- "8000:8080"
|
||||||
|
volumes:
|
||||||
|
- ./openapi.yml:/usr/share/nginx/html/openapi.yml
|
||||||
|
environment:
|
||||||
|
API_URL: openapi.yml
|
||||||
|
|
|
@ -16,6 +16,7 @@ externalDocs:
|
||||||
url: https://easyappointments.org/docs.html
|
url: https://easyappointments.org/docs.html
|
||||||
servers:
|
servers:
|
||||||
- url: https://demo.easyappointments.org/index.php/api/v1/
|
- url: https://demo.easyappointments.org/index.php/api/v1/
|
||||||
|
- url: http://localhost/index.php/api/v1/
|
||||||
tags:
|
tags:
|
||||||
- name: admins
|
- name: admins
|
||||||
- name: appointments
|
- name: appointments
|
||||||
|
|
Loading…
Reference in a new issue